View Javadoc

1   /*
2    * $Id$
3    * 
4    * Created on 26 Jan 2010 by Paul Harrison (paul.harrison@manchester.ac.uk)
5    *
6    * Adapted from official SOFA C implementation http://www.iausofa.org/
7    */ 
8   
9   package org.jastronomy.jsofa;
10  
11  import static java.lang.StrictMath.*; 
12  
13  /**
14   * Java implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
15   * 
16   * This code has been created by hand translating the official C version.
17   * 
18   * @author Paul Harrison (paul.harrison@manchester.ac.uk) 02 Apr 2014
19   * @version JSOFA Release 20170420
20   * @since 26 Jan 2010
21   */
22  public class JSOFA {
23      /** tracked IAU SOFA release {@value}. */
24      public final static String SOFA_RELEASE = "2017-04-20";
25      
26      /** JSOFA release {@value}*/
27      public final static String JSOFA_RELEASE = "20170420";
28  
29      /** tracked IAU SOFA revision {@value}. */
30      public final static String SOFA_REVISION = "13";
31  
32      
33  
34      /** Seconds of time to radians {@value} */
35      public final static double DS2R = (7.272205216643039903848712e-5);
36  
37      /** Pi {@value}*/
38      public final static double DPI = (3.141592653589793238462643);
39  
40      /** 2Pi {@value}*/
41      public final static double D2PI = (6.283185307179586476925287);
42  
43      /** Radians to degrees {@value} */
44      public final static double DR2D = (57.29577951308232087679815);
45  
46      /** Degrees to radians {@value}*/
47      public final static double DD2R = (1.745329251994329576923691e-2);
48  
49      /** Radians to arcseconds {@value}*/
50      public final static double DR2AS = (206264.8062470963551564734);
51  
52      /** Arcseconds to radians {@value}*/
53      public final static double DAS2R = (4.848136811095359935899141e-6);
54  
55      /** Arcseconds in a full circle {@value}*/
56      public final static double TURNAS = (1296000.0);
57  
58      /** Milliarcseconds to radians {@value}*/
59      public final static double DMAS2R = (DAS2R / 1e3);
60  
61      /** Length of tropical year B1900 (days) {@value}*/
62      public final static double DTY = (365.242198781);
63  
64      /** Reference epoch (J2000.0), Julian Date {@value}*/
65      public final static double DJ00 = (2451545.0);
66  
67      /** Julian Date of Modified Julian Date zero {@value}*/
68      public final static double DJM0 = (2400000.5);
69  
70      /** Reference epoch (J2000.0), Modified Julian Date {@value} */
71      public final static double DJM00 = (51544.5);
72  
73      /** Seconds per day. {@value}*/
74      public final static double DAYSEC = (86400.0);
75  
76      /** Days per Julian year */
77      public final static double DJY = (365.25);
78  
79      /** Days per Julian century {@value} */
80      public final static double DJC = (36525.0);
81  
82      /** Days per Julian millennium {@value} */
83      public final static double DJM = (365250.0);
84      
85      /** 1977 Jan 1.0 as MJD */
86      public final static double DJM77 = (43144.0);
87  
88      /** TT minus TAI (s) */
89      public final static double TTMTAI = (32.184);
90  
91  
92      /**  Astronomical unit (m) IAU 2012 {@value} */
93      public final static double DAU = (149597870.7e3);
94      
95      /** Speed of light (m/s) {@value} */
96      public final static double CMPS = 299792458.0;
97  
98      /** Light time for 1 au (s) {@value} */
99      public final static double AULT = (DAU/CMPS);
100 
101 
102     /** Speed of light (au per day) {@value} */
103     public final static double DC = (DAYSEC / AULT);
104     
105     /** L_G = 1 - d(TT)/d(TCG) */
106     public final static double ELG = (6.969290134e-10);
107 
108     /** L_B = 1 - d(TDB)/d(TCB) at TAI 1977/1/1.0 */
109     public final static double ELB = (1.550519768e-8);
110     
111     /** Schwarzschild radius of the Sun (au) {@value}
112      = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */
113     public final static double SRS = 1.97412574336e-8;
114 
115     
116     /** TDB (s) at TAI 1977/1/1.0 */
117     public final static double TDB0 = (-6.55e-5);
118 
119 
120     /** dint(A) - truncate to nearest whole number towards zero (double)  */
121     private static double dint(final double A){ return ((A)<0.0?ceil(A):floor(A));}
122 
123     /** dnint(A) - round to nearest whole number (double)  */
124     private static double dnint(final double A){return ((A)<0.0?ceil((A)-0.5):floor((A)+0.5));}
125 
126     /** dsign(A,B) - magnitude of A with sign of B (double) */
127     private static double dsign(final double A, double B){return ((B)<0.0?-abs(A):abs(A));}
128 
129 
130     
131     /**
132      * Julian Date representation. The actual date is djm0+djm1, apportioned in any
133      *     convenient way between the two arguments.  For example,
134      *     JD(TT)=2450123.7 could be expressed in any of these ways,
135      *     among others:
136      *<pre>
137      *            djm0          djm1
138      *
139      *         2450123.7           0.0       (JD method)
140      *         2451545.0       -1421.3       (J2000 method)
141      *         2400000.5       50123.2       (MJD method)
142      *         2450123.5           0.2       (date &amp;time method)
143      *</pre>
144      * 
145      * The JD method is the most natural and convenient to use in
146      *     cases where the loss of several decimal digits of resolution
147      *     is acceptable.  The J2000 method is best matched to the way
148      *     the argument is handled internally and will deliver the
149      *     optimum resolution.  The MJD method and the date &amp;time methods
150      *     are both good compromises between resolution and convenience.
151      * 
152      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Jan 2010
153      * 
154      * 
155      */
156     public static class JulianDate {
157         /**  MJD zero-point */
158         public double djm0;  
159         /** MJD offset */
160         public double djm1;
161         public JulianDate(double d1, double d2) {
162             djm0 = d1;
163             djm1 = d2;
164         }
165     }
166  
167     /**
168     * Decompose radians into degrees, arcminutes, arcseconds, fraction.
169     *  
170     *
171     *  <p>This function is derived from the International Astronomical Union's
172     *  SOFA (Standards Of Fundamental Astronomy) software collection.
173     *
174     *  <p>Status:  vector/matrix support function.
175     *  
176     *
177     *
178     *<p>Called:<ul>
179     *     <li>{@link #jauD2tf}      decompose days to hms
180     *</ul>
181     * <p>Notes:
182     *<ol>
183     *  <li> The argument ndp is interpreted as follows:
184     *
185     * <pre>
186     *     ndp         resolution
187     *      :      ...0000 00 00
188     *     -7         1000 00 00
189     *     -6          100 00 00
190     *     -5           10 00 00
191     *     -4            1 00 00
192     *     -3            0 10 00
193     *     -2            0 01 00
194     *     -1            0 00 10
195     *      0            0 00 01
196     *      1            0 00 00.1
197     *      2            0 00 00.01
198     *      3            0 00 00.001
199     *      :            0 00 00.000...
200     *</pre>
201     *  <li> The largest positive useful value for ndp is determined by the
202     *     size of angle, the format of doubles on the target platform, and
203     *     the risk of overflowing idmsf[3].  On a typical platform, for
204     *     angle up to 2pi, the available floating-point precision might
205     *     correspond to ndp=12.  However, the practical limit is typically
206     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
207     *     only 16 bits.
208     *
209     *  <li> The absolute value of angle may exceed 2pi.  In cases where it
210     *     does not, it is up to the caller to test for and handle the
211     *     case where angle is very nearly 2pi and rounds up to 360 degrees,
212     *     by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
213     *</ol>
214     *@version 2008 May 27
215     *
216     *  @since Release 20101201
217     *
218     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
219     * <!-- Given: -->
220     *    @param ndp     int     resolution (Note 1)
221     *    @param angle   double  angle in radians
222     *    @param idmsf   int[4] <u>returned</u> degrees, arcminutes, arcseconds, fraction
223     * <!-- Returned: -->
224     *    @return sign    char    '+' or '-'
225     */
226     public static char jauA2af(final int ndp, final double angle,  int idmsf[] ){
227         /* Hours to degrees * radians to turns */
228         final double F = 15.0 / D2PI;
229 
230 
231      /* Scale then use days to h,m,s function. */
232         char retval = jauD2tf(ndp, angle*F, idmsf);
233 
234         return retval;
235 
236         
237     }
238     
239 
240     
241     /**
242     *  Decompose radians into hours, minutes, seconds, fraction.
243     *
244     *<p>This function is derived from the International Astronomical Union's
245     *  SOFA (Standards Of Fundamental Astronomy) software collection.
246     *
247     *<p>Status:  vector/matrix support function.
248     *
249     *<!-- Given: -->
250     *     @param ndp      int      resolution (Note 1)
251     *     @param angle    double   angle in radians
252     *
253     *<!-- Returned: -->
254     *     @param ihmsf    int[4]    <u>returned</u> hours, minutes, seconds, fraction
255     *     @return sign     char      <u>returned</u> '+' or '-'
256     *
257     *<p>Called:<ul>
258     *     <li>{@link #jauD2tf} decompose days to hms
259     * </ul>
260     * <p>Notes:
261     * <ol>
262     *
263     * <li> The argument ndp is interpreted as follows:
264     * <pre>
265     *     ndp         resolution
266     *      :      ...0000 00 00
267     *     -7         1000 00 00
268     *     -6          100 00 00
269     *     -5           10 00 00
270     *     -4            1 00 00
271     *     -3            0 10 00
272     *     -2            0 01 00
273     *     -1            0 00 10
274     *      0            0 00 01
275     *      1            0 00 00.1
276     *      2            0 00 00.01
277     *      3            0 00 00.001
278     *      :            0 00 00.000...
279     *</pre>
280     * <li> The largest positive useful value for ndp is determined by the
281     *     size of angle, the format of doubles on the target platform, and
282     *     the risk of overflowing ihmsf[3].  On a typical platform, for
283     *     angle up to 2pi, the available floating-point precision might
284     *     correspond to ndp=12.  However, the practical limit is typically
285     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
286     *     only 16 bits.
287     *
288     * <li> The absolute value of angle may exceed 2pi.  In cases where it
289     *     does not, it is up to the caller to test for and handle the
290     *     case where angle is very nearly 2pi and rounds up to 24 hours,
291     *     by testing for ihmsf[0]=24 and setting ihmsf(0-3) to zero.
292     *</ol>
293     *  @version 2008 May 11
294     *
295     *  @since Release 20101201
296     *
297     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
298     */
299     public static char jauA2tf(final int ndp, final double angle, int ihmsf[])
300     {
301     /* Scale then use days to h,m,s function. */
302      return  jauD2tf(ndp, angle/D2PI, ihmsf);
303 
304      }
305     
306 
307     /**
308     *  Normalize angle into the range {@literal 0 <= a < 2pi}.
309     *
310     *<p>This function is derived from the International Astronomical Union's
311     *  SOFA (Standards Of Fundamental Astronomy) software collection.
312     *
313     *<p>Status:  vector/matrix support function.
314     *
315     *<!-- Given: -->
316     *     @param a         double      angle (radians)
317     *
318     * <!-- Returned (function value): -->
319     *  @return double     angle in range 0-2pi
320     *
321     *@version 2008 May 16
322     *
323     *  @since Release 20101201
324     *
325     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
326     */
327     public static double jauAnp(final double a)
328    {
329        double w;
330 
331 
332        w = fmod(a, D2PI);
333        if (w < 0) w += D2PI;
334 
335        return w;
336 
337     }
338     
339 
340     /**
341     *  Normalize angle into the range  {@literal -pi <= a < +pi}.
342     *
343     *<p>This function is derived from the International Astronomical Union's
344     *  SOFA (Standards Of Fundamental Astronomy) software collection.
345     *
346     *<p>Status:  vector/matrix support function.
347     *
348     *<!-- Given: -->
349     *     @param a         double      angle (radians)
350     *
351     * <!-- Returned (function value): -->
352     *  @return double     angle in range +/-pi
353     *
354     *@version 2008 May 16
355     *
356     *  @since Release 20101201
357     *
358     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
359     */
360     public static double jauAnpm(final double a)
361     {
362        double w;
363 
364 
365        w = fmod(a, D2PI);
366        if (abs(w) >= DPI) w -= dsign(D2PI, a);
367 
368        return w;
369 
370         }
371     /**
372      * Frame bias components of IAU 2000 precession-nutation models.
373      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 2 Feb 2010
374      * 
375      * @since AIDA Stage 1
376      */
377     public static class FrameBias {
378         /** longitude  corrections */
379         public double dpsibi;
380         /**obliquity corrections */
381         public double depsbi;
382         /** the ICRS RA of the J2000.0 mean equinox */
383         public double dra;
384     };
385 
386     /**
387     *  Frame bias components of IAU 2000 precession-nutation models (part
388     *  of MHB2000 with additions).
389     *
390     *<p>This function is derived from the International Astronomical Union's
391     *  SOFA (Standards Of Fundamental Astronomy) software collection.
392     *
393     *<p>Status:  canonical model.
394     *
395     *<!-- Returned: -->
396     *     @return dpsibi,depsbi   double    <u>returned</u> longitude and obliquity corrections
397     *             dra             double    <u>returned</u> the ICRS RA of the J2000.0 mean equinox
398     *
399     * <p>Notes:
400     * <ol>
401     *
402     * <li> The frame bias corrections in longitude and obliquity (radians)
403     *     are required in order to correct for the offset between the GCRS
404     *     pole and the mean J2000.0 pole.  They define, with respect to the
405     *     GCRS frame, a J2000.0 mean pole that is consistent with the rest
406     *     of the IAU 2000A precession-nutation model.
407     *
408     * <li> In addition to the displacement of the pole, the complete
409     *     description of the frame bias requires also an offset in right
410     *     ascension.  This is not part of the IAU 2000A model, and is from
411     *     Chapront et al. (2002).  It is returned in radians.
412     *
413     * <li> This is a supplemented implementation of one aspect of the IAU
414     *     2000A nutation model, formally adopted by the IAU General
415     *     Assembly in 2000, namely MHB2000 (Mathews et al. 2002).
416     *</ol>
417     *<p>References:
418     *
419     *     Chapront, J., Chapront-Touze, M. &amp;Francou, G., Astron.
420     *     Astrophys., 387, 700, 2002.
421     *
422     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
423     *     and precession   New nutation series for nonrigid Earth and
424     *     insights into the Earth's interior", J.Geophys.Res., 107, B4,
425     *     2002.  The MHB2000 code itself was obtained on 9th September 2002
426     *     from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
427     *
428     *@version 2009 December 17
429     *
430     *  @since Release 20101201
431     *
432     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
433     */
434     public static FrameBias jauBi00()
435    {
436     /* The frame bias corrections in longitude and obliquity */
437        final double DPBIAS = -0.041775  * DAS2R,
438                     DEBIAS = -0.0068192 * DAS2R;
439 
440     /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */
441        final double DRA0 = -0.0146 * DAS2R;
442 
443 
444     /* Return the results (which are fixed). */
445        FrameBias retval = new FrameBias();
446        retval.dpsibi = DPBIAS;
447        retval.depsbi = DEBIAS;
448        retval.dra = DRA0;
449 
450        return retval;
451 
452         }
453     
454 
455     /**
456     *  Frame bias and precession, IAU 2000.
457     *
458     *<p>This function is derived from the International Astronomical Union's
459     *  SOFA (Standards Of Fundamental Astronomy) software collection.
460     *
461     *<p>Status:  canonical model.
462     *
463     *<!-- Given: -->
464     *     @param date1
465     *      @param date2   double          TT as a 2-part Julian Date (Note 1)
466     *
467     *<!-- Returned: -->
468     *     @param rb            double[3][3]     <u>returned</u> frame bias matrix (Note 2)
469     *     @param rp            double[3][3]     <u>returned</u> precession matrix (Note 3)
470     *     @param rbp           double[3][3]     <u>returned</u> bias-precession matrix (Note 4)
471     *
472     * <p>Notes:
473     * <ol>
474     *
475     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
476     *     convenient way between the two arguments.  For example,
477     *     JD(TT)=2450123.7 could be expressed in any of these ways,
478     *     among others:
479     *<pre>
480     *             date1         date2
481     *
482     *         2450123.7           0.0       (JD method)
483     *         2451545.0       -1421.3       (J2000 method)
484     *         2400000.5       50123.2       (MJD method)
485     *         2450123.5           0.2       (date &amp;time method)
486     *</pre>
487     *     The JD method is the most natural and convenient to use in
488     *     cases where the loss of several decimal digits of resolution
489     *     is acceptable.  The J2000 method is best matched to the way
490     *     the argument is handled internally and will deliver the
491     *     optimum resolution.  The MJD method and the date &amp;time methods
492     *     are both good compromises between resolution and convenience.
493     *
494     * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
495     *     applying frame bias.
496     *
497     * <li> The matrix rp transforms vectors from J2000.0 mean equator and
498     *     equinox to mean equator and equinox of date by applying
499     *     precession.
500     *
501     * <li> The matrix rbp transforms vectors from GCRS to mean equator and
502     *     equinox of date by applying frame bias then precession.  It is
503     *     the product rp x rb.
504     *
505     * <li> It is permissible to re-use the same array in the returned
506     *     arguments.  The arrays are filled in the order given.
507     *</ol>
508     *<p>Called:<ul>
509     *     <li>{@link #jauBi00} frame bias components, IAU 2000
510     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
511     *     <li>{@link #jauIr} initialize r-matrix to identity
512     *     <li>{@link #jauRx} rotate around X-axis
513     *     <li>{@link #jauRy} rotate around Y-axis
514     *     <li>{@link #jauRz} rotate around Z-axis
515     *     <li>{@link #jauCr} copy r-matrix
516     *     <li>{@link #jauRxr} product of two r-matrices
517     * </ul>
518     *<p>Reference:
519     *     "Expressions for the Celestial Intermediate Pole and Celestial
520     *     Ephemeris Origin consistent with the IAU 2000A precession-
521     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
522     *
523     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
524     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
525     *
526     *@version 2010 January 18
527     *
528     *  @since Release 20101201
529     *
530     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
531     */
532     public static void jauBp00(final double  date1, final double date2,
533             double rb[][], double rp[][], double rbp[][])
534     {
535     /* J2000.0 obliquity (Lieske et al. 1977) */
536        final double EPS0 = 84381.448 * DAS2R;
537 
538        double t, dpsibi, depsbi;
539        double dra0, psia77, oma77, chia, dpsipr, depspr, psia, oma,
540               rbw[][] = new double[3][3];
541 
542 
543     /* Interval between fundamental epoch J2000.0 and current date (JC). */
544        t = ((date1 - DJ00) + date2) / DJC;
545 
546     /* Frame bias. */
547        FrameBias fb = jauBi00();
548        dpsibi = fb.dpsibi;
549        depsbi = fb.depsbi;
550        dra0 = fb.dra;
551     /* Precession angles (Lieske et al. 1977) */
552        psia77 = (5038.7784 + (-1.07259 + (-0.001147) * t) * t) * t * DAS2R;
553        oma77  =       EPS0 + ((0.05127 + (-0.007726) * t) * t) * t * DAS2R;
554        chia   = (  10.5526 + (-2.38064 + (-0.001125) * t) * t) * t * DAS2R;
555 
556     /* Apply IAU 2000 precession corrections. */
557        PrecessionDeltaTerms pc = jauPr00(date1, date2);
558        dpsipr = pc.dpsipr;  depspr = pc.depspr;
559        psia = psia77 + dpsipr;
560        oma  = oma77  + depspr;
561 
562     /* Frame bias matrix: GCRS to J2000.0. */
563        jauIr(rbw);
564        jauRz(dra0, rbw);
565        jauRy(dpsibi * sin(EPS0), rbw);
566        jauRx(-depsbi, rbw);
567        jauCr(rbw, rb);
568 
569     /* Precession matrix: J2000.0 to mean of date. */
570        jauIr(rp);
571        jauRx(EPS0,  rp);
572        jauRz(-psia, rp);
573        jauRx(-oma,  rp);
574        jauRz(chia,  rp);
575 
576     /* Bias-precession matrix: GCRS to mean of date. */
577        double[][] rt = jauRxr(rp, rbw );
578        jauCr(rt, rbp);
579        return;
580 
581         }
582     
583 
584     /**
585     *  Frame bias and precession, IAU 2006.
586     *
587     *<p>This function is derived from the International Astronomical Union's
588     *  SOFA (Standards Of Fundamental Astronomy) software collection.
589     *
590     *<p>Status:  support function.
591     *
592     *<!-- Given: -->
593     *     @param date1 double TT as a 2-part Julian Date (Note 1)
594     *     @param date2 double TT as a 2-part Julian Date (Note 1)
595     *
596     *<!-- Returned: -->
597     *     @param rb            double[3][3]     <u>returned</u> frame bias matrix (Note 2)
598     *     @param rp            double[3][3]     <u>returned</u> precession matrix (Note 3)
599     *     @param rbp           double[3][3]     <u>returned</u> bias-precession matrix (Note 4)
600     *
601     * <p>Notes:
602     * <ol>
603     *
604     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
605     *     convenient way between the two arguments.  For example,
606     *     JD(TT)=2450123.7 could be expressed in any of these ways,
607     *     among others:
608     *<pre>
609     *             date1         date2
610     *
611     *         2450123.7           0.0       (JD method)
612     *         2451545.0       -1421.3       (J2000 method)
613     *         2400000.5       50123.2       (MJD method)
614     *         2450123.5           0.2       (date &amp;time method)
615     *</pre>
616     *     The JD method is the most natural and convenient to use in
617     *     cases where the loss of several decimal digits of resolution
618     *     is acceptable.  The J2000 method is best matched to the way
619     *     the argument is handled internally and will deliver the
620     *     optimum resolution.  The MJD method and the date &amp;time methods
621     *     are both good compromises between resolution and convenience.
622     *
623     * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
624     *     applying frame bias.
625     *
626     * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
627     *     date by applying precession.
628     *
629     * <li> The matrix rbp transforms vectors from GCRS to mean of date by
630     *     applying frame bias then precession.  It is the product rp x rb.
631     * 
632     *  <li> It is permissible to re-use the same array in the returned
633     *        arguments.  The arrays are filled in the order given.
634     *</ol>
635     *<p>Called:<ul>
636     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
637     *     <li>{@link #jauFw2m} F-W angles to r-matrix
638     *     <li>{@link #jauPmat06} PB matrix, IAU 2006
639     *     <li>{@link #jauTr} transpose r-matrix
640     *     <li>{@link #jauRxr} product of two r-matrices
641     * </ul>
642     *<p>References:
643     *
644     *     <p>Capitaine, N. &amp;Wallace, P.T., 2006, Astron.Astrophys. 450, 855
645     *
646     *     <p>Wallace, P.T. &amp;Capitaine, N., 2006, Astron.Astrophys. 459, 981
647     *
648     *@version 2009 December 17
649     *
650     *  @since Release 20101201
651     *
652     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
653     */
654         public static void jauBp06(final double date1, final double date2,
655                  double rb[][], double rp[][], double rbp[][])
656     {
657        double rbt[][];
658 
659 
660     /* B matrix. */
661        FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
662        double[][] rt = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
663        jauCr(rt, rb);
664 
665     /* PxB matrix. */
666        rt = jauPmat06(date1, date2 );
667        jauCr(rt, rbp);
668 
669     /* P matrix. */
670        rbt = jauTr(rb);
671        rt = jauRxr(rbp, rbt);
672        jauCr(rt, rp);
673 
674        return;
675 
676         }
677     
678      /**
679      * The components x,y are components of the Celestial Intermediate
680      *     Pole unit vector in the Geocentric Celestial Reference System.
681      *     
682      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Jan 2010
683      * 
684      * @since AIDA Stage 1
685      */
686     public static class CelestialIntermediatePole {
687          public double x; 
688          public double y;
689          public CelestialIntermediatePole(double x, double y) {
690             this.x = x;
691             this.y = y;
692         }
693      }
694     /**
695     *  Extract from the bias-precession-nutation matrix the X,Y coordinates
696     *  of the Celestial Intermediate Pole.
697     *
698     *<p>This function is derived from the International Astronomical Union's
699     *  SOFA (Standards Of Fundamental Astronomy) software collection.
700     *
701     *<p>Status:  support function.
702     *
703     *<!-- Given: -->
704     *     @param rbpn       double[3][3]   celestial-to-true matrix (Note 1)
705     *
706     *<!-- Returned: -->
707     *     @return     <u>returned</u> Celestial Intermediate Pole (Note 2)
708     *
709     * <p>Notes:
710     * <ol>
711     *
712     * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
713     *     CIO or equinox) of date, and therefore the Celestial Intermediate
714     *     Pole unit vector is the bottom row of the matrix.
715     *
716     * <li> The arguments x,y are components of the Celestial Intermediate
717     *     Pole unit vector in the Geocentric Celestial Reference System.
718     *</ol>
719     *<p>Reference:
720     *
721     *     "Expressions for the Celestial Intermediate Pole and Celestial
722     *     Ephemeris Origin consistent with the IAU 2000A precession-
723     *     nutation model", Astron.Astrophys. 400, 1145-1154
724     *     (2003)
725     *
726     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
727     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
728     *
729     *@version 2010 January 18
730     *
731     *  @since Release 20101201
732     *
733     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
734     */
735         public static CelestialIntermediatePole  jauBpn2xy(double rbpn[][])
736     {
737     /* Extract the X,Y coordinates. */
738 
739        return new CelestialIntermediatePole(rbpn[2][0], rbpn[2][1]);
740 
741         }
742     
743 
744     /**
745     *  Form the celestial-to-intermediate matrix for a given date using the
746     *  IAU 2000A precession-nutation model.
747     *
748     *<p>This function is derived from the International Astronomical Union's
749     *  SOFA (Standards Of Fundamental Astronomy) software collection.
750     *
751     *<p>Status:  support function.
752     *
753     *<!-- Given: -->
754     *     @param date1 double TT as a 2-part Julian Date (Note 1)
755     *     @param date2 double TT as a 2-part Julian Date (Note 1)
756     *
757     *<!-- Returned: -->
758     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
759     *
760     * <p>Notes:
761     * <ol>
762     *
763     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
764     *     convenient way between the two arguments.  For example,
765     *     JD(TT)=2450123.7 could be expressed in any of these ways,
766     *     among others:
767     *<pre>
768     *            date1          date2
769     *
770     *         2450123.7           0.0       (JD method)
771     *         2451545.0       -1421.3       (J2000 method)
772     *         2400000.5       50123.2       (MJD method)
773     *         2450123.5           0.2       (date &amp;time method)
774     *</pre>
775     *     The JD method is the most natural and convenient to use in
776     *     cases where the loss of several decimal digits of resolution
777     *     is acceptable.  The J2000 method is best matched to the way
778     *     the argument is handled internally and will deliver the
779     *     optimum resolution.  The MJD method and the date &amp;time methods
780     *     are both good compromises between resolution and convenience.
781     *
782     * <li> The matrix rc2i is the first stage in the transformation from
783     *     celestial to terrestrial coordinates:
784     *
785     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
786     *
787     *               =  rc2t * [CRS]
788     *
789     *     where [CRS] is a vector in the Geocentric Celestial Reference
790     *     System and [TRS] is a vector in the International Terrestrial
791     *     Reference System (see IERS Conventions 2003), ERA is the Earth
792     *     Rotation Angle and RPOM is the polar motion matrix.
793     *
794     * <li> A faster, but slightly less accurate result (about 1 mas), can be
795     *     obtained by using instead the jauC2i00b function.
796     *</ol>
797     *<p>Called:<ul>
798     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
799     *     <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
800     * </ul>
801     *<p>References:
802     *<ul>
803     *     <li>"Expressions for the Celestial Intermediate Pole and Celestial
804     *     Ephemeris Origin consistent with the IAU 2000A precession-
805     *     nutation model", Astron.Astrophys. 400, 1145-1154
806     *     (2003)
807     *
808     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
809     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
810     *
811     *    <li>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
812     *     IERS Technical Note No. 32, BKG (2004)
813     *</ul>
814     *@version 2010 January 18
815     *
816     *  @since Release 20101201
817     *
818     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
819     */
820     public static double[][] jauC2i00a(double date1, double date2)
821     {
822 
823 
824     /* Obtain the celestial-to-true matrix (IAU 2000A). */
825        double rbpn[][] = jauPnm00a(date1, date2);
826 
827     /* Form the celestial-to-intermediate matrix. */
828        double rc2i[][]  =jauC2ibpn(date1, date2, rbpn);
829 
830        return rc2i;
831 
832         }
833     
834 
835     /**
836     *  Form the celestial-to-intermediate matrix for a given date using the
837     *  IAU 2000B precession-nutation model.
838     *
839     *<p>This function is derived from the International Astronomical Union's
840     *  SOFA (Standards Of Fundamental Astronomy) software collection.
841     *
842     *<p>Status:  support function.
843     *
844     *<!-- Given: -->
845     *     @param date1 double TT as a 2-part Julian Date (Note 1)
846     *     @param date2 double TT as a 2-part Julian Date (Note 1)
847     *
848     *<!-- Returned: -->
849     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
850     *
851     * <p>Notes:
852     * <ol>
853     *
854     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
855     *     convenient way between the two arguments.  For example,
856     *     JD(TT)=2450123.7 could be expressed in any of these ways,
857     *     among others:
858     *<pre>
859     *            date1          date2
860     *
861     *         2450123.7           0.0       (JD method)
862     *         2451545.0       -1421.3       (J2000 method)
863     *         2400000.5       50123.2       (MJD method)
864     *         2450123.5           0.2       (date &amp;time method)
865     *</pre>
866     *     The JD method is the most natural and convenient to use in
867     *     cases where the loss of several decimal digits of resolution
868     *     is acceptable.  The J2000 method is best matched to the way
869     *     the argument is handled internally and will deliver the
870     *     optimum resolution.  The MJD method and the date &amp;time methods
871     *     are both good compromises between resolution and convenience.
872     *
873     * <li> The matrix rc2i is the first stage in the transformation from
874     *     celestial to terrestrial coordinates:
875     *
876     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
877     *
878     *               =  rc2t * [CRS]
879     *
880     *     where [CRS] is a vector in the Geocentric Celestial Reference
881     *     System and [TRS] is a vector in the International Terrestrial
882     *     Reference System (see IERS Conventions 2003), ERA is the Earth
883     *     Rotation Angle and RPOM is the polar motion matrix.
884     *
885     * <li> The present function is faster, but slightly less accurate (about
886     *     1 mas), than the jauC2i00a function.
887     *</ol>
888     *<p>Called:<ul>
889     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
890     *     <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
891     * </ul>
892     *<p>References:
893     *
894     *    <p> "Expressions for the Celestial Intermediate Pole and Celestial
895     *     Ephemeris Origin consistent with the IAU 2000A precession-
896     *     nutation model", Astron.Astrophys. 400, 1145-1154
897     *     (2003)
898     *
899     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
900     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
901     *
902     *    <p> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
903     *     IERS Technical Note No. 32, BKG (2004)
904     *
905     *@version 2010 January 18
906     *
907     *  @since Release 20101201
908     *
909     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
910     */
911     public static double[][] jauC2i00b(double date1, double date2)
912     {
913        double rbpn[][];
914        double rc2i[][];
915 
916     /* Obtain the celestial-to-true matrix (IAU 2000B). */
917        rbpn = jauPnm00b(date1, date2 );
918 
919     /* Form the celestial-to-intermediate matrix. */
920        rc2i = jauC2ibpn(date1, date2, rbpn);
921 
922        return rc2i;
923 
924         }
925     
926 
927     /**
928     *  Form the celestial-to-intermediate matrix for a given date using the
929     *  IAU 2006 precession and IAU 2000A nutation models.
930     *
931     *<p>This function is derived from the International Astronomical Union's
932     *  SOFA (Standards Of Fundamental Astronomy) software collection.
933     *
934     *<p>Status:  support function.
935     *
936     *<!-- Given: -->
937     *     @param date1 double TT as a 2-part Julian Date (Note 1)
938     *     @param date2 double TT as a 2-part Julian Date (Note 1)
939     *
940     *<!-- Returned: -->
941     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
942     *
943     * <p>Notes:
944     * <ol>
945     *
946     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
947     *     convenient way between the two arguments.  For example,
948     *     JD(TT)=2450123.7 could be expressed in any of these ways,
949     *     among others:
950     *<pre>
951     *            date1          date2
952     *
953     *         2450123.7           0.0       (JD method)
954     *         2451545.0       -1421.3       (J2000 method)
955     *         2400000.5       50123.2       (MJD method)
956     *         2450123.5           0.2       (date &amp;time method)
957     *</pre>
958     *     The JD method is the most natural and convenient to use in
959     *     cases where the loss of several decimal digits of resolution
960     *     is acceptable.  The J2000 method is best matched to the way
961     *     the argument is handled internally and will deliver the
962     *     optimum resolution.  The MJD method and the date &amp;time methods
963     *     are both good compromises between resolution and convenience.
964     *
965     * <li> The matrix rc2i is the first stage in the transformation from
966     *     celestial to terrestrial coordinates:
967     *
968     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
969     *
970     *               =  RC2T * [CRS]
971     *
972     *     where [CRS] is a vector in the Geocentric Celestial Reference
973     *     System and [TRS] is a vector in the International Terrestrial
974     *     Reference System (see IERS Conventions 2003), ERA is the Earth
975     *     Rotation Angle and RPOM is the polar motion matrix.
976     *</ol>
977     *<p>Called:<ul>
978     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
979     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
980     *     <li>{@link #jauS06} the CIO locator s, Given X,Y, IAU 2006
981     *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, Given X,Y and s
982     * </ul>
983     *<p>References:
984     *
985     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
986     *     IERS Technical Note No. 32, BKG
987     *
988     *@version 2008 May 13
989     *
990     *  @since Release 20101201
991     *
992     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
993     */
994     public static double[][] jauC2i06a(double date1, double date2)
995     {
996        double rbpn[][], s,  rc2i[][];
997 
998 
999     /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */
1000        rbpn = jauPnm06a(date1, date2);
1001 
1002     /* Extract the X,Y coordinates. */
1003        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1004 
1005     /* Obtain the CIO locator. */
1006        s = jauS06(date1, date2, cip.x, cip.y);
1007 
1008     /* Form the celestial-to-intermediate matrix. */
1009        rc2i = jauC2ixys(cip.x, cip.y, s);
1010 
1011        return rc2i;
1012 
1013         }
1014     
1015 
1016     /**
1017     *  Form the celestial-to-intermediate matrix for a given date given
1018     *  the bias-precession-nutation matrix.  IAU 2000.
1019     *
1020     *<p>This function is derived from the International Astronomical Union's
1021     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1022     *
1023     *<p>Status:  support function.
1024     *
1025     *<!-- Given: -->
1026     *     @param date1 double TT as a 2-part Julian Date (Note 1)
1027     *     @param date2 double TT as a 2-part Julian Date (Note 1)
1028     *     @param rbpn         double[3][3]  celestial-to-true matrix (Note 2)
1029     *
1030     *<!-- Returned: -->
1031     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 3)
1032     *
1033     * <p>Notes:
1034     * <ol>
1035     *
1036     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1037     *     convenient way between the two arguments.  For example,
1038     *     JD(TT)=2450123.7 could be expressed in any of these ways,
1039     *     among others:
1040     *<pre>
1041     *            date1          date2
1042     *
1043     *         2450123.7           0.0       (JD method)
1044     *         2451545.0       -1421.3       (J2000 method)
1045     *         2400000.5       50123.2       (MJD method)
1046     *         2450123.5           0.2       (date &amp;time method)
1047     *</pre>
1048     *     The JD method is the most natural and convenient to use in
1049     *     cases where the loss of several decimal digits of resolution
1050     *     is acceptable.  The J2000 method is best matched to the way
1051     *     the argument is handled internally and will deliver the
1052     *     optimum resolution.  The MJD method and the date &amp;time methods
1053     *     are both good compromises between resolution and convenience.
1054     *
1055     * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
1056     *     CIO or equinox) of date.  Only the CIP (bottom row) is used.
1057     *
1058     * <li> The matrix rc2i is the first stage in the transformation from
1059     *     celestial to terrestrial coordinates:
1060     *
1061     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1062     *
1063     *              = RC2T * [CRS]
1064     *
1065     *     where [CRS] is a vector in the Geocentric Celestial Reference
1066     *     System and [TRS] is a vector in the International Terrestrial
1067     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1068     *     Rotation Angle and RPOM is the polar motion matrix.
1069     *
1070     * <li> Although its name does not include "00", This function is in fact
1071     *     specific to the IAU 2000 models.
1072     *</ol>
1073     *<p>Called:<ul>
1074     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
1075     *     <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1076     * </ul>
1077     *<p>References:
1078     *    <p> "Expressions for the Celestial Intermediate Pole and Celestial
1079     *     Ephemeris Origin consistent with the IAU 2000A precession-
1080     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
1081     *
1082     *     <p>n.b. The celestial ephemeris origin (CEO) was renamed "celestial
1083     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
1084     *
1085     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1086     *     IERS Technical Note No. 32, BKG (2004)
1087     *
1088     *@version 2010 January 18
1089     *
1090     *  @since Release 20101201
1091     *
1092     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1093     */
1094     public static double[][] jauC2ibpn(double date1, double date2, double rbpn[][])
1095     {
1096 
1097     /* Extract the X,Y coordinates. */
1098        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1099        
1100        
1101     /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */
1102        double rc2i[][] =jauC2ixy(date1, date2, cip.x, cip.y);
1103 
1104        return rc2i;
1105 
1106         }
1107     
1108 
1109     /**
1110     *  Form the celestial to intermediate-frame-of-date matrix for a given
1111     *  date when the CIP X,Y coordinates are known.  IAU 2000.
1112     *
1113     *<p>This function is derived from the International Astronomical Union's
1114     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1115     *
1116     *<p>Status:  support function.
1117     *
1118     *<!-- Given: -->
1119     *     @param date1 double TT as a 2-part Julian Date (Note 1)
1120     *     @param date2 double TT as a 2-part Julian Date (Note 1)
1121     *     @param x double        Celestial Intermediate Pole (Note 2)
1122     *     @param y double        Celestial Intermediate Pole (Note 2) 
1123     *
1124     *<!-- Returned: -->
1125     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 3)
1126     *
1127     * <p>Notes:
1128     * <ol>
1129     *
1130     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1131     *     convenient way between the two arguments.  For example,
1132     *     JD(TT)=2450123.7 could be expressed in any of these ways,
1133     *     among others:
1134     *<pre>
1135     *            date1          date2
1136     *
1137     *         2450123.7           0.0       (JD method)
1138     *         2451545.0       -1421.3       (J2000 method)
1139     *         2400000.5       50123.2       (MJD method)
1140     *         2450123.5           0.2       (date &amp;time method)
1141     *</pre>
1142     *     The JD method is the most natural and convenient to use in
1143     *     cases where the loss of several decimal digits of resolution
1144     *     is acceptable.  The J2000 method is best matched to the way
1145     *     the argument is handled internally and will deliver the
1146     *     optimum resolution.  The MJD method and the date &amp;time methods
1147     *     are both good compromises between resolution and convenience.
1148     *
1149     * <li> The Celestial Intermediate Pole coordinates are the x,y components
1150     *     of the unit vector in the Geocentric Celestial Reference System.
1151     *
1152     * <li> The matrix rc2i is the first stage in the transformation from
1153     *     celestial to terrestrial coordinates:
1154     *
1155     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1156     *
1157     *              = RC2T * [CRS]
1158     *
1159     *     where [CRS] is a vector in the Geocentric Celestial Reference
1160     *     System and [TRS] is a vector in the International Terrestrial
1161     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1162     *     Rotation Angle and RPOM is the polar motion matrix.
1163     *
1164     * <li> Although its name does not include "00", This function is in fact
1165     *     specific to the IAU 2000 models.
1166     *</ol>
1167     *<p>Called:<ul>
1168     *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
1169     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
1170     * </ul>
1171     *<p>Reference:
1172     *
1173     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1174     *     IERS Technical Note No. 32, BKG (2004)
1175     *
1176     *@version 2008 May 11
1177     *
1178     *  @since Release 20101201
1179     *
1180     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1181     */
1182 
1183     public static  double[][] jauC2ixy(double date1, double date2, double x, double y)
1184     {
1185     /* Compute s and then the matrix. */
1186        double rc2i[][] = jauC2ixys(x, y, jauS00(date1, date2, x, y));
1187 
1188        return rc2i;
1189 
1190         }
1191     
1192 
1193     /**
1194     *  Form the celestial to intermediate-frame-of-date matrix given the CIP
1195     *  X,Y and the CIO locator s.
1196     *
1197     *<p>This function is derived from the International Astronomical Union's
1198     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1199     *
1200     *<p>Status:  support function.
1201     *
1202     *<!-- Given: -->
1203     *     @param x double          Celestial Intermediate Pole (Note 1)
1204     *     @param y double          Celestial Intermediate Pole (Note 1) 
1205     *     @param s         double          the CIO locator s (Note 2)
1206     *
1207     *<!-- Returned: -->
1208     *     @return rc2i      double[3][3]     <u>returned</u> celestial-to-intermediate matrix (Note 3)
1209     *
1210     * <p>Notes:
1211     * <ol>
1212     *
1213     * <li> The Celestial Intermediate Pole coordinates are the x,y
1214     *     components of the unit vector in the Geocentric Celestial
1215     *     Reference System.
1216     *
1217     * <li> The CIO locator s (in radians) positions the Celestial
1218     *     Intermediate Origin on the equator of the CIP.
1219     *
1220     * <li> The matrix rc2i is the first stage in the transformation from
1221     *     celestial to terrestrial coordinates:
1222     *
1223     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1224     *
1225     *              = RC2T * [CRS]
1226     *
1227     *     where [CRS] is a vector in the Geocentric Celestial Reference
1228     *     System and [TRS] is a vector in the International Terrestrial
1229     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1230     *     Rotation Angle and RPOM is the polar motion matrix.
1231     *</ol>
1232     *<p>Called:<ul>
1233     *     <li>{@link #jauIr} initialize r-matrix to identity
1234     *     <li>{@link #jauRz} rotate around Z-axis
1235     *     <li>{@link #jauRy} rotate around Y-axis
1236     * </ul>
1237     *<p>Reference:
1238     *
1239     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1240     *     IERS Technical Note No. 32, BKG (2004)
1241     *
1242     *@version 2008 May 11
1243     *
1244     *  @since Release 20101201
1245     *
1246     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1247     */
1248     public static double[][] jauC2ixys(double x, double y, double s)
1249     {
1250        double r2, e, d;
1251        double rc2i[][] = new double[3][3];
1252 
1253     /* Obtain the spherical angles E and d. */
1254        r2 = x*x + y*y;
1255        e = (r2 > 0.0) ? atan2(y, x) : 0.0;
1256        d = atan(sqrt(r2 / (1.0 - r2)));
1257 
1258     /* Form the matrix. */
1259        jauIr(rc2i);
1260        jauRz(e, rc2i);
1261        jauRy(d, rc2i);
1262        jauRz(-(e+s), rc2i);
1263 
1264        return rc2i;
1265 
1266         }
1267     
1268     /**
1269     *  P-vector to spherical coordinates.
1270     *
1271     *<p>This function is derived from the International Astronomical Union's
1272     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1273     *
1274     *<p>Status:  vector/matrix support function.
1275     *
1276     *<!-- Given: -->
1277     *     @param p       double[3]     p-vector
1278     *
1279     *<!-- Returned: -->
1280     *     @return theta   double         <u>returned</u> longitude angle (radians)
1281     *             phi     double         <u>returned</u> latitude angle (radians)
1282     *
1283     * <p>Notes:
1284     * <ol>
1285     *
1286     * <li> The vector p can have any magnitude; only its direction is used.
1287     *
1288     * <li> If p is null, zero theta and phi are returned.
1289     *
1290     * <li> At either pole, zero theta is returned.
1291     *</ol>
1292     *@version 2008 May 11
1293     *
1294     *  @since Release 20101201
1295     *
1296     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1297     */
1298     public static SphericalCoordinate jauC2s(double p[])
1299     {
1300        double x, y, z, d2;
1301 
1302 
1303        x  = p[0];
1304        y  = p[1];
1305        z  = p[2];
1306        d2 = x*x + y*y;
1307 
1308        double theta = (d2 == 0.0) ? 0.0 : atan2(y, x);
1309        double phi = (z == 0.0) ? 0.0 : atan2(z, sqrt(d2));
1310 
1311        return new SphericalCoordinate(theta, phi);
1312 
1313         }
1314     
1315 
1316     /**
1317     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1318     *  the polar motion, using the IAU 2000A nutation model.
1319     *
1320     *<p>This function is derived from the International Astronomical Union's
1321     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1322     *
1323     *<p>Status:  support function.
1324     *
1325     *<!-- Given: -->
1326     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1327     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1328     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1329     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1330     *     @param xp double          coordinates of the pole (radians, Note 2)
1331     *     @param yp double          coordinates of the pole (radians, Note 2) 
1332     *
1333     *<!-- Returned: -->
1334     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1335     *
1336     * <p>Notes:
1337     * <ol>
1338     *
1339     *   <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1340     *     apportioned in any convenient way between the arguments uta and
1341     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1342     *     these ways, among others:
1343     *<pre>
1344     *             uta            utb
1345     *
1346     *         2450123.7           0.0       (JD method)
1347     *         2451545.0       -1421.3       (J2000 method)
1348     *         2400000.5       50123.2       (MJD method)
1349     *         2450123.5           0.2       (date &amp;time method)
1350     *</pre>
1351     *     The JD method is the most natural and convenient to use in
1352     *     cases where the loss of several decimal digits of resolution is
1353     *     acceptable.  The J2000 and MJD methods are good compromises
1354     *     between resolution and convenience.  In the case of uta,utb, the
1355     *     date &amp;time method is best matched to the Earth rotation angle
1356     *     algorithm used:  maximum precision is delivered when the uta
1357     *     argument is for 0hrs UT1 on the day in question and the utb
1358     *     argument lies in the range 0 to 1, or vice versa.
1359     *
1360     *  <li> The arguments xp and yp are the coordinates (in radians) of the
1361     *     Celestial Intermediate Pole with respect to the International
1362     *     Terrestrial Reference System (see IERS Conventions 2003),
1363     *     measured along the meridians to 0 and 90 deg west respectively.
1364     *
1365     * <li> The matrix rc2t transforms from celestial to terrestrial
1366     *     coordinates:
1367     *
1368     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1369     *
1370     *              = rc2t * [CRS]
1371     *
1372     *     where [CRS] is a vector in the Geocentric Celestial Reference
1373     *     System and [TRS] is a vector in the International Terrestrial
1374     *     Reference System (see IERS Conventions 2003), RC2I is the
1375     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1376     *     angle and RPOM is the polar motion matrix.
1377     *
1378     * <li> A faster, but slightly less accurate result (about 1 mas), can
1379     *     be obtained by using instead the jauC2t00b function.
1380     *</ol>
1381     *<p>Called:<ul>
1382     *     <li>{@link #jauC2i00a} celestial-to-intermediate matrix, IAU 2000A
1383     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1384     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1385     *     <li>{@link #jauPom00} polar motion matrix
1386     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1387     * </ul>
1388     *<p>Reference:
1389     *
1390     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1391     *     IERS Technical Note No. 32, BKG (2004)
1392     *
1393     *@version 2009 April 1
1394     *
1395     *  @since Release 20101201
1396     *
1397     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1398     */
1399     public static  double[][] jauC2t00a(final double tta, final double ttb, final double uta, final double utb,
1400                    final double xp, final double yp)
1401     {
1402        double rc2i[][]= new double[3][3], era, sp, rpom[][];
1403 
1404 
1405     /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */
1406        rc2i = jauC2i00a(tta, ttb);
1407 
1408     /* Predict the Earth rotation angle for this UT1. */
1409        era = jauEra00(uta, utb);
1410 
1411     /* Estimate s'. */
1412        sp = jauSp00(tta, ttb);
1413 
1414     /* Form the polar motion matrix. */
1415        rpom = jauPom00(xp, yp, sp );
1416 
1417     /* Combine to form the celestial-to-terrestrial matrix. */
1418        double[][] rc2t = jauC2tcio(rc2i, era, rpom );
1419 
1420        return rc2t;
1421 
1422         }
1423     
1424 
1425     /**
1426     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1427     *  the polar motion, using the IAU 2000B nutation model.
1428     *
1429     *<p>This function is derived from the International Astronomical Union's
1430     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1431     *
1432     *<p>Status:  support function.
1433     *
1434     *<!-- Given: -->
1435     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1436     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1437     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1438     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1439     *     @param xp double          coordinates of the pole (radians, Note 2)
1440     *     @param yp double          coordinates of the pole (radians, Note 2) 
1441     *
1442     *<!-- Returned: -->
1443     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1444     *
1445     * <p>Notes:
1446     * <ol>
1447     *
1448     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1449     *     apportioned in any convenient way between the arguments uta and
1450     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1451     *     these ways, among others:
1452     *<pre>
1453     *             uta            utb
1454     *
1455     *         2450123.7           0.0       (JD method)
1456     *         2451545.0       -1421.3       (J2000 method)
1457     *         2400000.5       50123.2       (MJD method)
1458     *         2450123.5           0.2       (date &amp;time method)
1459     *</pre>
1460     *     The JD method is the most natural and convenient to use in
1461     *     cases where the loss of several decimal digits of resolution is
1462     *     acceptable.  The J2000 and MJD methods are good compromises
1463     *     between resolution and convenience.  In the case of uta,utb, the
1464     *     date &amp;time method is best matched to the Earth rotation angle
1465     *     algorithm used:  maximum precision is delivered when the uta
1466     *     argument is for 0hrs UT1 on the day in question and the utb
1467     *     argument lies in the range 0 to 1, or vice versa.
1468     *
1469     * <li> The arguments xp and yp are the coordinates (in radians) of the
1470     *     Celestial Intermediate Pole with respect to the International
1471     *     Terrestrial Reference System (see IERS Conventions 2003),
1472     *     measured along the meridians to 0 and 90 deg west respectively.
1473     *
1474     * <li> The matrix rc2t transforms from celestial to terrestrial
1475     *     coordinates:
1476     *
1477     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1478     *
1479     *              = rc2t * [CRS]
1480     *
1481     *     where [CRS] is a vector in the Geocentric Celestial Reference
1482     *     System and [TRS] is a vector in the International Terrestrial
1483     *     Reference System (see IERS Conventions 2003), RC2I is the
1484     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1485     *     angle and RPOM is the polar motion matrix.
1486     *
1487     * <li> The present function is faster, but slightly less accurate (about
1488     *     1 mas), than the jauC2t00a function.
1489     *</ol>
1490     *<p>Called:<ul>
1491     *     <li>{@link #jauC2i00b} celestial-to-intermediate matrix, IAU 2000B
1492     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1493     *     <li>{@link #jauPom00} polar motion matrix
1494     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1495     * </ul>
1496     *<p>Reference:
1497     *
1498     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1499     *     IERS Technical Note No. 32, BKG (2004)
1500     *
1501     *@version 2009 April 1
1502     *
1503     *  @since Release 20101201
1504     *
1505     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1506     */
1507     public static double[][] jauC2t00b(final double tta, final double ttb, final double uta, final double utb,
1508                    final double xp, final double yp )
1509     {
1510        double rc2i[][], era, rpom[][];
1511        double rc2t[][];
1512 
1513     /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */
1514        rc2i =jauC2i00b(tta, ttb);
1515 
1516     /* Predict the Earth rotation angle for this UT1. */
1517        era = jauEra00(uta, utb);
1518 
1519     /* Form the polar motion matrix (neglecting s'). */
1520        rpom = jauPom00(xp, yp, 0.0 );
1521 
1522     /* Combine to form the celestial-to-terrestrial matrix. */
1523        rc2t = jauC2tcio(rc2i, era, rpom );
1524 
1525        return rc2t;
1526 
1527         }
1528     
1529 
1530     /**
1531     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1532     *  the polar motion, using the IAU 2006 precession and IAU 2000A
1533     *  nutation models.
1534     *
1535     *<p>This function is derived from the International Astronomical Union's
1536     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1537     *
1538     *<p>Status:  support function.
1539     *
1540     *<!-- Given: -->
1541     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1542     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1543     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1544     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1545     *     @param xp double          coordinates of the pole (radians, Note 2)
1546     *     @param yp double          coordinates of the pole (radians, Note 2) 
1547     *
1548     *<!-- Returned: -->
1549     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1550     *
1551     * <p>Notes:
1552     * <ol>
1553     *
1554     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1555     *     apportioned in any convenient way between the arguments uta and
1556     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1557     *     these ways, among others:
1558     *<pre>
1559     *             uta            utb
1560     *
1561     *         2450123.7           0.0       (JD method)
1562     *         2451545.0       -1421.3       (J2000 method)
1563     *         2400000.5       50123.2       (MJD method)
1564     *         2450123.5           0.2       (date &amp;time method)
1565     *</pre>
1566     *     The JD method is the most natural and convenient to use in
1567     *     cases where the loss of several decimal digits of resolution is
1568     *     acceptable.  The J2000 and MJD methods are good compromises
1569     *     between resolution and convenience.  In the case of uta,utb, the
1570     *     date &amp;time method is best matched to the Earth rotation angle
1571     *     algorithm used:  maximum precision is delivered when the uta
1572     *     argument is for 0hrs UT1 on the day in question and the utb
1573     *     argument lies in the range 0 to 1, or vice versa.
1574     *
1575     * <li> The arguments xp and yp are the coordinates (in radians) of the
1576     *     Celestial Intermediate Pole with respect to the International
1577     *     Terrestrial Reference System (see IERS Conventions 2003),
1578     *     measured along the meridians to 0 and 90 deg west respectively.
1579     *
1580     * <li> The matrix rc2t transforms from celestial to terrestrial
1581     *     coordinates:
1582     *
1583     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1584     *
1585     *              = rc2t * [CRS]
1586     *
1587     *     where [CRS] is a vector in the Geocentric Celestial Reference
1588     *     System and [TRS] is a vector in the International Terrestrial
1589     *     Reference System (see IERS Conventions 2003), RC2I is the
1590     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1591     *     angle and RPOM is the polar motion matrix.
1592     *</ol>
1593     *<p>Called:<ul>
1594     *     <li>{@link #jauC2i06a} celestial-to-intermediate matrix, IAU 2006/2000A
1595     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1596     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1597     *     <li>{@link #jauPom00} polar motion matrix
1598     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1599     * </ul>
1600     *<p>Reference:
1601     *
1602     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1603     *     IERS Technical Note No. 32, BKG
1604     *
1605     *@version 2009 April 1
1606     *
1607     *  @since Release 20101201
1608     *
1609     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1610     */
1611     public static double[][] jauC2t06a(final double tta, final double ttb, final double uta, final double utb,
1612                   final double xp, final double yp)
1613     {
1614        double rc2i[][], era, sp, rpom[][], rc2t[][];
1615 
1616 
1617     /* Form the celestial-to-intermediate matrix for this TT. */
1618        rc2i = jauC2i06a(tta, ttb);
1619 
1620     /* Predict the Earth rotation angle for this UT1. */
1621        era = jauEra00(uta, utb);
1622 
1623     /* Estimate s'. */
1624        sp = jauSp00(tta, ttb);
1625 
1626     /* Form the polar motion matrix. */
1627        rpom = jauPom00(xp, yp, sp );
1628 
1629     /* Combine to form the celestial-to-terrestrial matrix. */
1630        rc2t = jauC2tcio(rc2i, era, rpom );
1631 
1632        return rc2t;
1633 
1634         }
1635     
1636 
1637     /**
1638     *  Assemble the celestial to terrestrial matrix from CIO-based
1639     *  components (the celestial-to-intermediate matrix, the Earth Rotation
1640     *  Angle and the polar motion matrix).
1641     *
1642     *<p>This function is derived from the International Astronomical Union's
1643     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1644     *
1645     *<p>Status:  support function.
1646     *
1647     *<!-- Given: -->
1648     *     @param rc2i      double[3][3]     celestial-to-intermediate matrix
1649     *     @param era       double           Earth rotation angle (radians)
1650     *     @param rpom      double[3][3]     polar-motion matrix
1651     *
1652     *<!-- Returned: -->
1653     *     @return rc2t      double[3][3]      <u>returned</u> celestial-to-terrestrial matrix
1654     *
1655     * <p>Notes:
1656     * <ol>
1657     *
1658     * <li> This function constructs the rotation matrix that transforms
1659     *     vectors in the celestial system into vectors in the terrestrial
1660     *     system.  It does so starting from precomputed components, namely
1661     *     the matrix which rotates from celestial coordinates to the
1662     *     intermediate frame, the Earth rotation angle and the polar motion
1663     *     matrix.  One use of the present function is when generating a
1664     *     series of celestial-to-terrestrial matrices where only the Earth
1665     *     Rotation Angle changes, avoiding the considerable overhead of
1666     *     recomputing the precession-nutation more often than necessary to
1667     *     achieve given accuracy objectives.
1668     *
1669     * <li> The relationship between the arguments is as follows:
1670     *
1671     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1672     *
1673     *              = rc2t * [CRS]
1674     *
1675     *     where [CRS] is a vector in the Geocentric Celestial Reference
1676     *     System and [TRS] is a vector in the International Terrestrial
1677     *     Reference System (see IERS Conventions 2003).
1678     *</ol>
1679     *<p>Called:<ul>
1680     *     <li>{@link #jauCr} copy r-matrix
1681     *     <li>{@link #jauRz} rotate around Z-axis
1682     *     <li>{@link #jauRxr} product of two r-matrices
1683     * </ul>
1684     *<p>Reference:
1685     *
1686     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1687     *     IERS Technical Note No. 32, BKG
1688     *
1689     *@version 2008 May 11
1690     *
1691     *  @since Release 20101201
1692     *
1693     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1694     */
1695     public static double[][] jauC2tcio(final double rc2i[][], final double era, final double rpom[][])
1696     {
1697        double r[][] = new double[3][3];
1698 
1699 
1700     /* Construct the matrix. */
1701        jauCr(rc2i, r);
1702        jauRz(era, r);
1703        double[][] rc2t = jauRxr(rpom, r);
1704 
1705        return rc2t;
1706 
1707         }
1708     
1709 
1710     /**
1711     *  Assemble the celestial to terrestrial matrix from equinox-based
1712     *  components (the celestial-to-true matrix, the Greenwich Apparent
1713     *  Sidereal Time and the polar motion matrix).
1714     *
1715     *<p>This function is derived from the International Astronomical Union's
1716     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1717     *
1718     *<p>Status:  support function.
1719     *
1720     *<!-- Given: -->
1721     *     @param rbpn      double[3][3]     celestial-to-true matrix
1722     *     @param gst       double           Greenwich (apparent) Sidereal Time (radians)
1723     *     @param rpom      double[3][3]     polar-motion matrix
1724     *
1725     *<!-- Returned: -->
1726     *     @return rc2t      double[3][3]      <u>returned</u> celestial-to-terrestrial matrix (Note 2)
1727     *
1728     * <p>Notes:
1729     * <ol>
1730     *
1731     * <li> This function constructs the rotation matrix that transforms
1732     *     vectors in the celestial system into vectors in the terrestrial
1733     *     system.  It does so starting from precomputed components, namely
1734     *     the matrix which rotates from celestial coordinates to the
1735     *     true equator and equinox of date, the Greenwich Apparent Sidereal
1736     *     Time and the polar motion matrix.  One use of the present function
1737     *     is when generating a series of celestial-to-terrestrial matrices
1738     *     where only the Sidereal Time changes, avoiding the considerable
1739     *     overhead of recomputing the precession-nutation more often than
1740     *     necessary to achieve given accuracy objectives.
1741     *
1742     * <li> The relationship between the arguments is as follows:
1743     *
1744     *        [TRS] = rpom * R_3(gst) * rbpn * [CRS]
1745     *
1746     *              = rc2t * [CRS]
1747     *
1748     *     where [CRS] is a vector in the Geocentric Celestial Reference
1749     *     System and [TRS] is a vector in the International Terrestrial
1750     *     Reference System (see IERS Conventions 2003).
1751     *</ol>
1752     *<p>Called:<ul>
1753     *     <li>{@link #jauCr} copy r-matrix
1754     *     <li>{@link #jauRz} rotate around Z-axis
1755     *     <li>{@link #jauRxr} product of two r-matrices
1756     * </ul>
1757     *<p>Reference:
1758     *
1759     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1760     *     IERS Technical Note No. 32, BKG (2004)
1761     *
1762     *@version 2008 May 11
1763     *
1764     *  @since Release 20101201
1765     *
1766     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1767     */
1768     public static double[][] jauC2teqx(final double rbpn[][], final double gst, final double rpom[][] )
1769     {
1770        double r[][] = new double[3][3], rc2t[][];
1771 
1772 
1773     /* Construct the matrix. */
1774        jauCr(rbpn, r);
1775        jauRz(gst, r);
1776        rc2t = jauRxr(rpom, r);
1777 
1778        return rc2t;
1779 
1780         }
1781     
1782 
1783     /**
1784     *  Form the celestial to terrestrial matrix given the date, the UT1,
1785     *  the nutation and the polar motion.  IAU 2000.
1786     *
1787     *<p>This function is derived from the International Astronomical Union's
1788     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1789     *
1790     *<p>Status:  support function.
1791     *
1792     *<!-- Given: -->
1793     *     @param tta double         TT as a 2-part Julian Date (Note 1)
1794     *     @param ttb double         TT as a 2-part Julian Date (Note 1) 
1795     *     @param uta double         UT1 as a 2-part Julian Date (Note 1)
1796     *     @param utb double         UT1 as a 2-part Julian Date (Note 1) 
1797     *     @param dpsi double         nutation (Note 2)
1798     *     @param deps double         nutation (Note 2) 
1799     *     @param xp double         coordinates of the pole (radians, Note 3)
1800     *     @param yp double         coordinates of the pole (radians, Note 3) 
1801     *
1802     *<!-- Returned: -->
1803     *     @return rc2t        double[3][3]    <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1804     *
1805     * <p>Notes:
1806     * <ol>
1807     *
1808     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1809     *     apportioned in any convenient way between the arguments uta and
1810     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1811     *     these ways, among others:
1812     *<pre>
1813     *             uta            utb
1814     *
1815     *         2450123.7           0.0       (JD method)
1816     *         2451545.0       -1421.3       (J2000 method)
1817     *         2400000.5       50123.2       (MJD method)
1818     *         2450123.5           0.2       (date &amp;time method)
1819     *</pre>
1820     *     The JD method is the most natural and convenient to use in
1821     *     cases where the loss of several decimal digits of resolution is
1822     *     acceptable.  The J2000 and MJD methods are good compromises
1823     *     between resolution and convenience.  In the case of uta,utb, the
1824     *     date &amp;time method is best matched to the Earth rotation angle
1825     *     algorithm used:  maximum precision is delivered when the uta
1826     *     argument is for 0hrs UT1 on the day in question and the utb
1827     *     argument lies in the range 0 to 1, or vice versa.
1828     *
1829     * <li> The caller is responsible for providing the nutation components;
1830     *     they are in longitude and obliquity, in radians and are with
1831     *     respect to the equinox and ecliptic of date.  For high-accuracy
1832     *     applications, free core nutation should be included as well as
1833     *     any other relevant corrections to the position of the CIP.
1834     *
1835     * <li> The arguments xp and yp are the coordinates (in radians) of the
1836     *     Celestial Intermediate Pole with respect to the International
1837     *     Terrestrial Reference System (see IERS Conventions 2003),
1838     *     measured along the meridians to 0 and 90 deg west respectively.
1839     *
1840     * <li> The matrix rc2t transforms from celestial to terrestrial
1841     *     coordinates:
1842     *
1843     *        [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
1844     *
1845     *              = rc2t * [CRS]
1846     *
1847     *     where [CRS] is a vector in the Geocentric Celestial Reference
1848     *     System and [TRS] is a vector in the International Terrestrial
1849     *     Reference System (see IERS Conventions 2003), RBPN is the
1850     *     bias-precession-nutation matrix, GST is the Greenwich (apparent)
1851     *     Sidereal Time and RPOM is the polar motion matrix.
1852     *
1853     * <li> Although its name does not include "00", This function is in fact
1854     *     specific to the IAU 2000 models.
1855     *</ol>
1856     *<p>Called:<ul>
1857     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
1858     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
1859     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1860     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
1861     *     <li>{@link #jauPom00} polar motion matrix
1862     *     <li>{@link #jauC2teqx} form equinox-based celestial-to-terrestrial matrix
1863     * </ul>
1864     *<p>Reference:
1865     *
1866     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1867     *     IERS Technical Note No. 32, BKG (2004)
1868     *
1869     *@version 2009 April 1
1870     *
1871     *  @since Release 20101201
1872     *
1873     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1874     */
1875     public static double[][] jauC2tpe(final double tta, final double ttb, final double uta, final double utb,
1876             final double dpsi, final double deps, final double xp, final double yp)
1877     {
1878        double rpom[][]; 
1879 
1880     /* Form the celestial-to-true matrix for this TT. */
1881        PrecessionNutation pn = jauPn00(tta, ttb, dpsi, deps);
1882 
1883     /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
1884        double gmst = jauGmst00(uta, utb, tta, ttb);
1885 
1886     /* Predict the equation of the equinoxes given TT and nutation. */
1887        double ee = jauEe00(tta, ttb, pn.epsa, dpsi);
1888 
1889     /* Estimate s'. */
1890        double sp = jauSp00(tta, ttb);
1891 
1892     /* Form the polar motion matrix. */
1893        rpom = jauPom00(xp, yp, sp);
1894 
1895     /* Combine to form the celestial-to-terrestrial matrix. */
1896        double[][] rc2t = jauC2teqx(pn.rbpn, gmst + ee, rpom );
1897 
1898        return rc2t;
1899 
1900         }
1901     
1902 
1903     /**
1904     *  Form the celestial to terrestrial matrix given the date, the UT1,
1905     *  the CIP coordinates and the polar motion.  IAU 2000.
1906     *
1907     *<p>This function is derived from the International Astronomical Union's
1908     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1909     *
1910     *<p>Status:  support function.
1911     *
1912     *<!-- Given: -->
1913     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1914     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1915     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1916     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1917     *     @param x double          Celestial Intermediate Pole (Note 2)
1918     *     @param y double          Celestial Intermediate Pole (Note 2) 
1919     *     @param xp double          coordinates of the pole (radians, Note 3)
1920     *     @param yp double          coordinates of the pole (radians, Note 3) 
1921     *
1922     *<!-- Returned: -->
1923     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1924     *
1925     * <p>Notes:
1926     * <ol>
1927     *
1928     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1929     *     apportioned in any convenient way between the arguments uta and
1930     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any o
1931     *     these ways, among others:
1932     *<pre>
1933     *             uta            utb
1934     *
1935     *         2450123.7           0.0       (JD method)
1936     *         2451545.0       -1421.3       (J2000 method)
1937     *         2400000.5       50123.2       (MJD method)
1938     *         2450123.5           0.2       (date &amp;time method)
1939     *</pre>
1940     *     The JD method is the most natural and convenient to use in
1941     *     cases where the loss of several decimal digits of resolution is
1942     *     acceptable.  The J2000 and MJD methods are good compromises
1943     *     between resolution and convenience.  In the case of uta,utb, the
1944     *     date &amp;time method is best matched to the Earth rotation angle
1945     *     algorithm used:  maximum precision is delivered when the uta
1946     *     argument is for 0hrs UT1 on the day in question and the utb
1947     *     argument lies in the range 0 to 1, or vice versa.
1948     *
1949     * <li> The Celestial Intermediate Pole coordinates are the x,y
1950     *     components of the unit vector in the Geocentric Celestial
1951     *     Reference System.
1952     *
1953     * <li> The arguments xp and yp are the coordinates (in radians) of the
1954     *     Celestial Intermediate Pole with respect to the International
1955     *     Terrestrial Reference System (see IERS Conventions 2003),
1956     *     measured along the meridians to 0 and 90 deg west respectively.
1957     *
1958     * <li> The matrix rc2t transforms from celestial to terrestrial
1959     *     coordinates:
1960     *
1961     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1962     *
1963     *              = rc2t * [CRS]
1964     *
1965     *     where [CRS] is a vector in the Geocentric Celestial Reference
1966     *     System and [TRS] is a vector in the International Terrestrial
1967     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1968     *     Rotation Angle and RPOM is the polar motion matrix.
1969     *
1970     * <li> Although its name does not include "00", This function is in fact
1971     *     specific to the IAU 2000 models.
1972     *</ol>
1973     *<p>Called:<ul>
1974     *     <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1975     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1976     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1977     *     <li>{@link #jauPom00} polar motion matrix
1978     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1979     * </ul>
1980     * Reference:
1981     *
1982     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1983     *     IERS Technical Note No. 32, BKG (2004)
1984     *
1985     *@version 2009 April 1
1986     *
1987     *  @since Release 20101201
1988     *
1989     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1990     */
1991     public static double[][] jauC2txy(double tta, double ttb, double uta, double utb,
1992                   double x, double y, double xp, double yp)
1993     {
1994        double rc2i[][] = new double[3][3], era, sp, rpom[][] = new double[3][3];
1995 
1996 
1997     /* Form the celestial-to-intermediate matrix for this TT. */
1998        rc2i = jauC2ixy(tta, ttb, x, y);
1999 
2000     /* Predict the Earth rotation angle for this UT1. */
2001        era = jauEra00(uta, utb);
2002 
2003     /* Estimate s'. */
2004        sp = jauSp00(tta, ttb);
2005 
2006     /* Form the polar motion matrix. */
2007        rpom = jauPom00(xp, yp, sp);
2008 
2009     /* Combine to form the celestial-to-terrestrial matrix. */
2010        double[][] rc2t = jauC2tcio(rc2i, era, rpom );
2011 
2012        return rc2t;
2013 
2014         }
2015     
2016     /**
2017     *  Gregorian Calendar to Julian Date.
2018     *
2019     *<p>This function is derived from the International Astronomical Union's
2020     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2021     *
2022     *<p>Status:  support function.
2023     *
2024     *<!-- Given: -->
2025     *     @param iy,im,id   int      year, month, day in Gregorian calendar (Note 1)
2026     *
2027     *<!-- Returned: -->
2028     *     @return d MJD zero-point: always 2400000.5
2029     *       <u>returned</u> Modified Julian Date for 0 hrs
2030     *
2031     * <!-- Returned (function value): -->
2032     *  @throws JSOFAIllegalParameter      status:
2033     *                           0 = OK
2034     *                          -1 = bad year   (Note 3: JD not computed)
2035     *                          -2 = bad month  (JD not computed)
2036     *                          -3 = bad day    (JD computed)
2037     *
2038     * <p>Notes:
2039     * <ol>
2040     *
2041     * <li> The algorithm used is valid from -4800 March 1, but this
2042     *     implementation rejects dates before -4799 January 1.
2043     *
2044     * <li> The Julian Date is returned in two pieces, in the usual JSOFA
2045     *     manner, which is designed to preserve time resolution.  The
2046     *     Julian Date is available as a single number by adding djm0 and
2047     *     djm.
2048     *
2049     * <li> In early eras the conversion is from the "Proleptic Gregorian
2050     *     Calendar";  no account is taken of the date(s) of adoption of
2051     *     the Gregorian Calendar, nor is the AD/BC numbering convention
2052     *     observed.
2053     *</ol>
2054     *<p>Reference:
2055     *
2056     *     <p>Explanatory Supplement to the Astronomical Almanac,
2057     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
2058     *     Section 12.92 (p604).
2059     *
2060     *@version 2009 October 19
2061     *
2062     *  @since Release 20101201
2063     *
2064     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2065     */
2066     public static JulianDate jauCal2jd(int iy, int im, int id) throws JSOFAIllegalParameter
2067     {
2068        int ly, my;
2069        long iypmy;
2070        double djm0, djm;
2071 
2072     /* Earliest year allowed (4800BC) */
2073        final int IYMIN = -4799;
2074 
2075     /* Month lengths in days */
2076        final int mtab[]
2077                          = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
2078 
2079 
2080     /* Validate year and month. */
2081        if (iy < IYMIN) throw new JSOFAIllegalParameter("bad year", -1);
2082        if (im < 1 || im > 12) throw new JSOFAIllegalParameter("bad month", -2);
2083 
2084     /* If February in a leap year, 1, otherwise 0. */
2085        ly = ((im == 2) &&(iy%4 == 0) && (iy%100 != 0 || (iy%400 == 0)))?1:0;
2086 
2087     /* Validate day, taking into account leap years. */
2088        if ( (id < 1) || (id > (mtab[im-1] + ly))) {
2089     }
2090 
2091     /* Return result. */
2092        my = (im - 14) / 12;
2093        iypmy = (long) (iy + my);
2094        djm0 = DJM0;
2095        djm = (double)((1461L * (iypmy + 4800L)) / 4L
2096                      + (367L * (long) (im - 2 - 12 * my)) / 12L
2097                      - (3L * ((iypmy + 4900L) / 100L)) / 4L
2098                      + (long) id - 2432076L);
2099 
2100     /* Return status. */
2101        return new JulianDate(djm0, djm);
2102 
2103         }
2104     
2105 
2106     /**
2107     *  Copy a p-vector.
2108     *
2109     *<p>This function is derived from the International Astronomical Union's
2110     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2111     *
2112     *<p>Status:  vector/matrix support function.
2113     *
2114     *<!-- Given: -->
2115     *     @param p         double[3]      p-vector to be copied
2116     *
2117     *<!-- Returned: -->
2118     *     @param c         double[3]       <u>given and returned</u> copy
2119     *
2120     *@version 2008 May 11
2121     *
2122     *  @since Release 20101201
2123     *
2124     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2125     */
2126     public static double[] jauCp(double p[], double c[])
2127     {
2128        
2129        c[0] = p[0];
2130        c[1] = p[1];
2131        c[2] = p[2];
2132 
2133        return c;
2134 
2135     }
2136     
2137 
2138     /**
2139     *  Copy a position/velocity vector.
2140     *
2141     *<p>This function is derived from the International Astronomical Union's
2142     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2143     *
2144     *<p>Status:  vector/matrix support function.
2145     *
2146     *<!-- Given: -->
2147     *     @param pv      double[2][3]     position/velocity vector to be copied
2148     *
2149     *<!-- Returned: -->
2150     *     @return c       double[2][3]      <u>returned</u> copy
2151     *
2152     *<p>Called:<ul>
2153     *     <li>{@link #jauCp} copy p-vector
2154     * </ul>
2155     *@version 2008 May 11
2156     *
2157     *  @since Release 20101201
2158     *
2159     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2160     */
2161     public static double[][] jauCpv(double pv[][],  double c[][])
2162     {
2163 
2164         c[0]=jauCp(pv[0], c[0]);
2165         c[1]=jauCp(pv[1], c[1]);
2166 
2167        return c;
2168 
2169         }
2170     
2171 
2172     /**
2173     *  Copy an r-matrix.
2174     *
2175     *<p>This function is derived from the International Astronomical Union's
2176     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2177     *
2178     *<p>Status:  vector/matrix support function.
2179     *
2180     *<!-- Given: -->
2181     *     @param r         double[3][3]     r-matrix to be copied.
2182     *
2183     *<!-- Returned: -->
2184     *   @param c      double[3][3]      <u>given and returned</u> the elements of r are copied into this.
2185     *
2186     *<p>Called:<ul>
2187     *     <li>{@link #jauCp} copy p-vector
2188     * </ul>
2189     *@version 2008 May 11
2190     *
2191     *  @since Release 20101201
2192     *
2193     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2194     */
2195     public static void jauCr(double r[][], double c[][] )
2196     {
2197 
2198        jauCp(r[0], c[0]);
2199        jauCp(r[1], c[1]);
2200        jauCp(r[2], c[2]);
2201 
2202        return;
2203 
2204         }
2205     
2206 
2207     /**
2208     *  Decompose days to hours, minutes, seconds, fraction.
2209     *
2210     *<p>This function is derived from the International Astronomical Union's
2211     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2212     *
2213     *<p>Status:  vector/matrix support function.
2214     *
2215     *<!-- Given: -->
2216     *     @param ndp      int      resolution (Note 1)
2217     *     @param days     double   interval in days
2218     *
2219     *<!-- Returned: -->
2220     *     @param ihmsf    int[4]    <u>returned</u> hours, minutes, seconds, fraction
2221     *     @return sign     char      <u>returned</u> '+' or '-'
2222     *
2223     * <p>Notes:
2224     * <ol>
2225     *
2226     * <li> The argument ndp is interpreted as follows:
2227     *
2228     *     ndp         resolution
2229     *      :      ...0000 00 00
2230     *     -7         1000 00 00
2231     *     -6          100 00 00
2232     *     -5           10 00 00
2233     *     -4            1 00 00
2234     *     -3            0 10 00
2235     *     -2            0 01 00
2236     *     -1            0 00 10
2237     *      0            0 00 01
2238     *      1            0 00 00.1
2239     *      2            0 00 00.01
2240     *      3            0 00 00.001
2241     *      :            0 00 00.000...
2242     *
2243     * <li> The largest positive useful value for ndp is determined by the
2244     *     size of days, the format of double on the target platform, and
2245     *     the risk of overflowing ihmsf[3].  On a typical platform, for
2246     *     days up to 1.0, the available floating-point precision might
2247     *     correspond to ndp=12.  However, the practical limit is typically
2248     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
2249     *     only 16 bits.
2250     *
2251     * <li> The absolute value of days may exceed 1.0.  In cases where it
2252     *     does not, it is up to the caller to test for and handle the
2253     *     case where days is very nearly 1.0 and rounds up to 24 hours,
2254     *     by testing for ihms[0]=24 and setting ihmsf[0-3] to zero.
2255     *</ol>
2256     *@version 2008 May 11
2257     *
2258     *  @since Release 20101201
2259     *
2260     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2261     */
2262    public static char jauD2tf(final int ndp, final double days, int ihmsf[])
2263     {
2264        int nrs, n;
2265        double rs, rm, rh, a, w, ah, am, as, af;
2266 
2267 
2268     /* Handle sign. */
2269       char sign = (char) ( ( days >= 0.0 ) ? '+' : '-' );
2270 
2271     /* Interval in seconds. */
2272        a = DAYSEC * abs(days);
2273 
2274     /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */
2275        if (ndp < 0) {
2276           nrs = 1;
2277           for (n = 1; n <= -ndp; n++) {
2278               nrs *= (n == 2 || n == 4) ? 6 : 10;
2279           }
2280           rs = (double) nrs;
2281           w = a / rs;
2282           a = rs * dnint(w);
2283        }
2284 
2285     /* Express the unit of each field in resolution units. */
2286        nrs = 1;
2287        for (n = 1; n <= ndp; n++) {
2288           nrs *= 10;
2289        }
2290        rs = (double) nrs;
2291        rm = rs * 60.0;
2292        rh = rm * 60.0;
2293 
2294     /* Round the interval and express in resolution units. */
2295        a = dnint(rs * a);
2296 
2297     /* Break into fields. */
2298        ah = a / rh;
2299        ah = dint(ah);
2300        a -= ah * rh;
2301        am = a / rm;
2302        am = dint(am);
2303        a -= am * rm;
2304        as = a / rs;
2305        as = dint(as);
2306        af = a - as * rs;
2307 
2308     /* Return results. */
2309        ihmsf[0] = (int) ah;
2310        ihmsf[1] = (int) am;
2311        ihmsf[2] = (int) as;
2312        ihmsf[3] = (int) af;
2313 
2314        return sign;
2315 
2316         }
2317  
2318    /**
2319     * Representation of Gregorian Calendar with fractional day.
2320     * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2321     * 
2322     * @since AIDA Stage 1
2323     */
2324    public static class Calendar {
2325        public final int iy;
2326        public final int im;
2327        public final int id;
2328        public final double fd;
2329        public Calendar (int iy, int im, int id, double fd)
2330        {
2331            this.iy = iy;
2332            this.im = im;
2333            this.id = id;
2334            this.fd = fd;
2335        }
2336    }
2337 
2338    /**
2339     * Representation of Gregorian Calendar with integer hours minutes and seconds.
2340     * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2341     * 
2342     * @since AIDA Stage 1
2343     */
2344    public static class CalendarHMS {
2345        public final int iy;
2346        public final int im;
2347        public final int id;
2348        public final int ihmsf[];
2349        public CalendarHMS (int iy, int im, int id, int hmsf[]){
2350            this.iy = iy;
2351            this.im = im;
2352            this.id = id;
2353            this.ihmsf = hmsf;
2354        }
2355    }
2356    
2357 /**
2358 **
2359 **  Format for output a 2-part Julian Date (or in the case of UTC a
2360 **  quasi-JD form that includes special provision for leap seconds).
2361 **
2362 **<p>This function is derived from the International Astronomical Union's
2363 **  SOFA (Standards of Fundamental Astronomy) software collection.
2364 **
2365 **<p>Status:  support function.
2366 **
2367 **<!-- Given: -->
2368 **     scale     char[]  time scale ID (Note 1)
2369 **     ndp       int     resolution (Note 2)
2370 **     d1,d2     double  time as a 2-part Julian Date (Notes 3,4)
2371 **
2372 **<!-- Returned:-->
2373 **     iy,im,id  int     year, month, day in Gregorian calendar (Note 5)
2374 **     ihmsf     int[4]  hours, minutes, seconds, fraction (Note 1)
2375 **
2376 **  Returned (function value):
2377 **               int     status: +1 = dubious year (Note 5)
2378 **                                0 = OK
2379 **                               -1 = unacceptable date (Note 6)
2380 **
2381 **<p>Notes:
2382 **
2383 **  1) scale identifies the time scale.  Only the value "UTC" (in upper
2384 **     case) is significant, and enables handling of leap seconds (see
2385 **     Note 4).
2386 **
2387 **  2) ndp is the number of decimal places in the seconds field, and can
2388 **     have negative as well as positive values, such as:
2389 **
2390 **     ndp         resolution
2391 **     -4            1 00 00
2392 **     -3            0 10 00
2393 **     -2            0 01 00
2394 **     -1            0 00 10
2395 **      0            0 00 01
2396 **      1            0 00 00.1
2397 **      2            0 00 00.01
2398 **      3            0 00 00.001
2399 **
2400 **     The limits are platform dependent, but a safe range is -5 to +9.
2401 **
2402 **  3) d1+d2 is Julian Date, apportioned in any convenient way between
2403 **     the two arguments, for example where d1 is the Julian Day Number
2404 **     and d2 is the fraction of a day.  In the case of UTC, where the
2405 **     use of JD is problematical, special conventions apply:  see the
2406 **     next note.
2407 **
2408 **  4) JD cannot unambiguously represent UTC during a leap second unless
2409 **     special measures are taken.  The SOFA internal convention is that
2410 **     the quasi-JD day represents UTC days whether the length is 86399,
2411 **     86400 or 86401 SI seconds.  In the 1960-1972 era there were
2412 **     smaller jumps (in either direction) each time the linear UTC(TAI)
2413 **     expression was changed, and these "mini-leaps" are also included
2414 **     in the SOFA convention.
2415 **
2416 **  5) The warning status "dubious year" flags UTCs that predate the
2417 **     introduction of the time scale or that are too far in the future
2418 **     to be trusted.  See iauDat for further details.
2419 **
2420 **  6) For calendar conventions and limitations, see iauCal2jd.
2421 **
2422 **  Called:
2423 **     iauJd2cal    JD to Gregorian calendar
2424 **     iauD2tf      decompose days to hms
2425 **     iauDat       delta(AT) = TAI-UTC
2426 **
2427 **@version 2014 February 15
2428 **
2429 **@since JSOFA release 20131202
2430 **
2431 **  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
2432  * @throws JSOFAInternalError 
2433  * @throws JSOFAIllegalParameter 
2434 */
2435 public static CalendarHMS jauD2dtf(final String scale, int ndp, double d1, double d2 ) throws JSOFAIllegalParameter, JSOFAInternalError
2436 {
2437  boolean leap;
2438  int iy1, im1, id1, iy2, im2, id2, ihmsf1[] = new int[4];
2439  double a1, b1, fd, dat0, dat12, dat24, dleap;
2440 
2441 
2442 /* The two-part JD. */
2443  a1 = d1;
2444  b1 = d2;
2445 
2446 /* Provisional calendar date. */
2447  Calendar cal = jauJd2cal(a1, b1);
2448  iy1 = cal.iy;
2449  im1 = cal.im;
2450  id1 = cal.id;
2451  fd = cal.fd;
2452 
2453 /* Is this a leap second day? */
2454  leap = false;
2455  if ( scale.equalsIgnoreCase("UTC") ) {
2456 
2457  /* TAI-UTC at 0h today. */
2458      dat0 = jauDat(iy1, im1, id1, 0.0 );
2459 
2460  /* TAI-UTC at 12h today (to detect drift). */
2461      dat12 = jauDat(iy1, im1, id1, 0.5);
2462 
2463  /* TAI-UTC at 0h tomorrow (to detect jumps). */
2464     cal = jauJd2cal(a1+1.5, b1-fd);
2465     iy2 = cal.iy;
2466     im2 = cal.im;
2467     id2 = cal.id;
2468     dat24 = jauDat(iy2, im2, id2, 0.0);
2469 
2470  /* Any sudden change in TAI-UTC (seconds). */
2471     dleap = dat24 - (2.0*dat12 - dat0);
2472 
2473  /* If leap second day, scale the fraction of a day into SI. */
2474     leap = (dleap != 0.0);
2475     if (leap) fd += fd * dleap/DAYSEC;
2476  }
2477 
2478 jauD2tf ( ndp, fd, ihmsf1 );
2479 
2480 /* Has the (rounded) time gone past 24h? */
2481  if ( ihmsf1[0] > 23 ) {
2482 
2483  /* Yes.  We probably need tomorrow's calendar date. */
2484     cal = jauJd2cal(a1+1.5, b1-fd);
2485     iy2 = cal.iy; im2 = cal.im; id2 = cal.id; 
2486     
2487  /* Is today a leap second day? */
2488     if ( ! leap ) {
2489 
2490     /* No.  Use 0h tomorrow. */
2491        iy1 = iy2;
2492        im1 = im2;
2493        id1 = id2;
2494        ihmsf1[0] = 0;
2495        ihmsf1[1] = 0;
2496        ihmsf1[2] = 0;
2497 
2498     } else {
2499 
2500     /* Yes.  Are we past the leap second itself? */
2501        if ( ihmsf1[2] > 0 ) {
2502 
2503        /* Yes.  Use tomorrow but allow for the leap second. */
2504           iy1 = iy2;
2505           im1 = im2;
2506           id1 = id2;
2507           ihmsf1[0] = 0;
2508           ihmsf1[1] = 0;
2509           ihmsf1[2] = 0;
2510 
2511        } else {
2512 
2513        /* No.  Use 23 59 60... today. */
2514           ihmsf1[0] = 23;
2515           ihmsf1[1] = 59;
2516           ihmsf1[2] = 60;
2517        }
2518 
2519     /* If rounding to 10s or coarser always go up to new day. */
2520        if ( ndp < 0 && ihmsf1[2] == 60 ) {
2521           iy1 = iy2;
2522           im1 = im2;
2523           id1 = id2;
2524           ihmsf1[0] = 0;
2525           ihmsf1[1] = 0;
2526           ihmsf1[2] = 0;
2527        }
2528     }
2529  }
2530 
2531 /* Results. */
2532  
2533  return new CalendarHMS(iy1, im1, id1, ihmsf1);
2534 
2535 }   
2536 
2537 /**
2538 **  Encode date and time fields into 2-part Julian Date (or in the case
2539 **  of UTC a quasi-JD form that includes special provision for leap
2540 **  seconds).
2541 **
2542 **<p>This function is derived from the International Astronomical Union's
2543 **  SOFA (Standards of Fundamental Astronomy) software collection.
2544 **
2545 **  Status:  support function.
2546 **
2547 **  Given:
2548 **    @param scale     char  time scale ID (Note 1)
2549 **    @param iy,im,id  int     year, month, day in Gregorian calendar (Note 2)
2550 **    @param ihr,imn   int     hour, minute
2551 **    @param sec       double  seconds
2552 **
2553 **  Returned:
2554 **     @return     2-part Julian Date (Notes 3,4)
2555 **
2556  * @throws JSOFAIllegalParameter 
2557  * @throws JSOFAInternalError 
2558 **          {@literal    status: +3 = both of next two
2559 **                               +2 = time is after end of day (Note 5)
2560 **                               +1 = dubious year (Note 6)
2561 **                                0 = OK
2562 **                               -1 = bad year
2563 **                               -2 = bad month
2564 **                               -3 = bad day
2565 **                               -4 = bad hour
2566 **                               -5 = bad minute
2567 **                               -6 = bad second (<0)}
2568 **
2569 **<p>Notes:
2570 **
2571 **  1) scale identifies the time scale.  Only the value "UTC" (in upper
2572 **     case) is significant, and enables handling of leap seconds (see
2573 **     Note 4).
2574 **
2575 **  2) For calendar conventions and limitations, see iauCal2jd.
2576 **
2577 **  3) The sum of the results, d1+d2, is Julian Date, where normally d1
2578 **     is the Julian Day Number and d2 is the fraction of a day.  In the
2579 **     case of UTC, where the use of JD is problematical, special
2580 **     conventions apply:  see the next note.
2581 **
2582 **  4) JD cannot unambiguously represent UTC during a leap second unless
2583 **     special measures are taken.  The SOFA internal convention is that
2584 **     the quasi-JD day represents UTC days whether the length is 86399,
2585 **     86400 or 86401 SI seconds.  In the 1960-1972 era there were
2586 **     smaller jumps (in either direction) each time the linear UTC(TAI)
2587 **     expression was changed, and these "mini-leaps" are also included
2588 **     in the SOFA convention.
2589 **
2590 **  5) The warning status "time is after end of day" usually means that
2591 **     the sec argument is greater than 60.0.  However, in a day ending
2592 **     in a leap second the limit changes to 61.0 (or 59.0 in the case
2593 **     of a negative leap second).
2594 **
2595 **  6) The warning status "dubious year" flags UTCs that predate the
2596 **     introduction of the time scale or that are too far in the future
2597 **     to be trusted.  See iauDat for further details.
2598 **
2599 **  7) Only in the case of continuous and regular time scales (TAI, TT,
2600 **     TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly
2601 **     speaking.  In the other cases (UT1 and UTC) the result must be
2602 **     used with circumspection;  in particular the difference between
2603 **     two such results cannot be interpreted as a precise time
2604 **     interval.
2605 **
2606 **  Called:
2607 **     iauCal2jd    Gregorian calendar to JD
2608 **     iauDat       delta(AT) = TAI-UTC
2609 **     iauJd2cal    JD to Gregorian calendar
2610 **
2611 **@version 2013 July 26
2612 **
2613 **@since JSOFA release 20131202
2614 **
2615 **  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
2616 */
2617 public static JulianDate jauDtf2d(final String scale, int iy, int im, int id,
2618         int ihr, int imn, double sec) throws JSOFAIllegalParameter, JSOFAInternalError
2619 {
2620 int js = 0, iy2, im2, id2;
2621 double dj, w, day, seclim, dat0, dat12, dat24, dleap, time;
2622 
2623 
2624 /* Today's Julian Day Number. */
2625 JulianDate jd = jauCal2jd(iy, im, id);
2626 dj = jd.djm0; w = jd.djm1;
2627 dj += w;
2628 
2629 /* Day length and final minute length in seconds (provisional). */
2630 day = DAYSEC;
2631 seclim = 60.0;
2632 
2633 /* Deal with the UTC leap second case. */
2634 if (  scale.equals("UTC") ) {
2635 
2636 /* TAI-UTC at 0h today. */
2637     dat0 = jauDat(iy, im, id, 0.0);
2638 
2639 /* TAI-UTC at 12h today (to detect drift). */
2640     dat12 = jauDat(iy, im, id, 0.5);
2641 
2642 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2643  Calendar cal = jauJd2cal ( dj, 1.5);
2644  iy2 = cal.iy; im2 = cal.im; id2 = cal.id; w = cal.fd;
2645  
2646  dat24 = jauDat(iy2, im2, id2, 0.0);
2647 
2648 /* Any sudden change in TAI-UTC between today and tomorrow. */
2649  dleap = dat24 - (2.0*dat12 - dat0);
2650 
2651 /* If leap second day, correct the day and final minute lengths. */
2652  day += dleap;
2653  if ( ihr == 23 && imn == 59 ) seclim += dleap;
2654 
2655 /* End of UTC-specific actions. */
2656 }
2657 
2658 /* Validate the time. */
2659 if ( ihr >= 0 && ihr <= 23 ) {
2660  if ( imn >= 0 && imn <= 59 ) {
2661     if ( sec >= 0 ) {
2662        if ( sec >= seclim ) {
2663           js += 2;
2664        }
2665     } else {
2666        js = -6;
2667     }
2668  } else {
2669     js = -5;
2670  }
2671 } else {
2672  js = -4;
2673 }
2674 if ( js < 0 ) throw new JSOFAInternalError("problem with time", js);
2675 
2676 /* The time in days. */
2677 time  = ( 60.0 * ( (double) ( 60 * ihr + imn ) ) + sec ) / day;
2678 
2679 /* Return the date and time. */
2680 return new JulianDate(dj, time) ;
2681 
2682 }
2683 
2684 
2685  
2686 /** Release year for this version of jauDat {@value} */
2687 public final static int IYV = 2016;
2688 static class LeapInfo {
2689     final public int iyear, month;
2690     final public double delat;
2691     public LeapInfo(int i, int m, double t) {
2692        iyear = i;
2693        month = m;
2694        delat = t;
2695     }
2696  }
2697 
2698 /* Dates and Delta(AT)s */
2699   static final LeapInfo leapSeconds[] = {
2700      new LeapInfo( 1960,  1,  1.4178180 ),
2701      new LeapInfo( 1961,  1,  1.4228180 ),
2702      new LeapInfo( 1961,  8,  1.3728180 ),
2703      new LeapInfo( 1962,  1,  1.8458580 ),
2704      new LeapInfo( 1963, 11,  1.9458580 ),
2705      new LeapInfo( 1964,  1,  3.2401300 ),
2706      new LeapInfo( 1964,  4,  3.3401300 ),
2707      new LeapInfo( 1964,  9,  3.4401300 ),
2708      new LeapInfo( 1965,  1,  3.5401300 ),
2709      new LeapInfo( 1965,  3,  3.6401300 ),
2710      new LeapInfo( 1965,  7,  3.7401300 ),
2711      new LeapInfo( 1965,  9,  3.8401300 ),
2712      new LeapInfo( 1966,  1,  4.3131700 ),
2713      new LeapInfo( 1968,  2,  4.2131700 ),
2714      new LeapInfo( 1972,  1, 10.0       ),
2715      new LeapInfo( 1972,  7, 11.0       ),
2716      new LeapInfo( 1973,  1, 12.0       ),
2717      new LeapInfo( 1974,  1, 13.0       ),
2718      new LeapInfo( 1975,  1, 14.0       ),
2719      new LeapInfo( 1976,  1, 15.0       ),
2720      new LeapInfo( 1977,  1, 16.0       ),
2721      new LeapInfo( 1978,  1, 17.0       ),
2722      new LeapInfo( 1979,  1, 18.0       ),
2723      new LeapInfo( 1980,  1, 19.0       ),
2724      new LeapInfo( 1981,  7, 20.0       ),
2725      new LeapInfo( 1982,  7, 21.0       ),
2726      new LeapInfo( 1983,  7, 22.0       ),
2727      new LeapInfo( 1985,  7, 23.0       ),
2728      new LeapInfo( 1988,  1, 24.0       ),
2729      new LeapInfo( 1990,  1, 25.0       ),
2730      new LeapInfo( 1991,  1, 26.0       ),
2731      new LeapInfo( 1992,  7, 27.0       ),
2732      new LeapInfo( 1993,  7, 28.0       ),
2733      new LeapInfo( 1994,  7, 29.0       ),
2734      new LeapInfo( 1996,  1, 30.0       ),
2735      new LeapInfo( 1997,  7, 31.0       ),
2736      new LeapInfo( 1999,  1, 32.0       ),
2737      new LeapInfo( 2006,  1, 33.0       ),
2738      new LeapInfo( 2009,  1, 34.0       ),
2739      new LeapInfo( 2012,  7, 35.0       ),
2740      new LeapInfo( 2015,  7, 36.0       ),
2741      new LeapInfo( 2017,  1, 37.0       )
2742   };
2743 
2744     /**
2745     *  For a given UTC date, calculate delta(AT) = TAI-UTC.
2746     *<pre>
2747     *     :------------------------------------------:
2748     *     :                                          :
2749     *     :                 IMPORTANT                :
2750     *     :                                          :
2751     *     :  A new version of this function must be  :
2752     *     :  produced whenever a new leap second is  :
2753     *     :  announced.  There are four items to     :
2754     *     :  change on each such occasion:           :
2755     *     :                                          :
2756     *     :  1) A new line must be added to the set  :
2757     *     :     of statements that initialize the    :
2758     *     :     array "changes".                     :
2759     *     :                                          :
2760     *     :  2) The parameter IYV must be set to     :
2761     *     :     the current year.                    :
2762     *     :                                          :
2763     *     :  3) The "Latest leap second" comment     :
2764     *     :     below must be set to the new leap    :
2765     *     :     second date.                         :
2766     *     :                                          :
2767     *     :  4) The "This revision" comment, later,  :
2768     *     :     must be set to the current date.     :
2769     *     :                                          :
2770     *     :  Change (2) must also be carried out     :
2771     *     :  whenever the function is re-issued,     :
2772     *     :  even if no leap seconds have been       :
2773     *     :  added.                                  :
2774     *     :                                          :
2775     *     :  Latest leap second:  2017 Jan 01        :
2776     *     :                                          :
2777     *     :__________________________________________:
2778     *</pre>
2779     *<p>This function is derived from the International Astronomical Union's
2780     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2781     *
2782     *<p>Status:  support function.
2783     *
2784     *<!-- Given: -->
2785     *     @param iy      int       UTC:  year (Notes 1 and 2)
2786     *     @param im      int             month (Note 2)
2787     *     @param id      int             day (Notes 2 and 3)
2788     *     @param fd      double          fraction of day (Note 4)
2789     *
2790     *<!-- Returned: -->
2791     *     @return deltat  double     <u>returned</u> TAI minus UTC, seconds
2792     *
2793     *  @throws     JSOFAIllegalParameter   status (Note 5):
2794     *                       1 = dubious year (Note 1)
2795     *                       0 = OK
2796     *                      -1 = bad year
2797     *                      -2 = bad month
2798     *                      -3 = bad day (Note 3)
2799     *                      -4 = bad fraction (Note 4)
2800     *
2801     * <p>Notes:
2802     * <ol>
2803     *
2804     * <li> UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
2805     *     to call the function with an earlier date.  If this is attempted,
2806     *     zero is returned together with a warning status.
2807     *
2808     *     Because leap seconds cannot, in principle, be predicted in
2809     *     advance, a reliable check for dates beyond the valid range is
2810     *     impossible.  To guard against gross errors, a year five or more
2811     *     after the release year of the present function (see parameter
2812     *     IYV) is considered dubious.  In this case a warning status is
2813     *     returned but the result is computed in the normal way.
2814     *
2815     *     For both too-early and too-late years, the warning status is
2816     *     j=+1.  This is distinct from the error status j=-1, which
2817     *     signifies a year so early that JD could not be computed.
2818     *
2819     * <li> If the specified date is for a day which ends with a leap second,
2820     *     the TAI-UTC value returned is for the period leading up to the
2821     *     leap second.  If the date is for a day which begins as a leap
2822     *     second ends, the TAI-UTC returned is for the period following the
2823     *     leap second.
2824     *
2825     * <li> The day number must be in the normal calendar range, for example
2826     *     1 through 30 for April.  The "almanac" convention of allowing
2827     *     such dates as January 0 and December 32 is not supported in this
2828     *     function, in order to avoid confusion near leap seconds.
2829     *
2830     * <li> The fraction of day is used only for dates before the
2831     *     introduction of leap seconds, the first of which occurred at the
2832     *     end of 1971.  It is tested for validity (zero to less than 1 is
2833     *     the valid range) even if not used;  if invalid, zero is used and
2834     *     status j=-4 is returned.  For many applications, setting fd to
2835     *     zero is acceptable;  the resulting error is always less than 3 ms
2836     *     (and occurs only pre-1972).
2837     *
2838     * <li> The status value returned in the case where there are multiple
2839     *     errors refers to the first error detected.  For example, if the
2840     *     month and day are 13 and 32 respectively, j=-2 (bad month)
2841     *     will be returned.
2842     *
2843     * <li> In cases where a valid result is not available, zero is returned.
2844     *
2845     *<p>References:
2846     *
2847     * <li> For dates from 1961 January 1 onwards, the expressions from the
2848     *     file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
2849     *
2850     * <li> The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of
2851     *     the 1992 Explanatory Supplement.
2852     *</ol>
2853     *<p>Called:<ul>
2854     *     <li>{@link #jauCal2jd} Gregorian calendar to Julian Day number
2855     * </ul>
2856     *<p>@version 20160729
2857     *
2858     *  @since Release 20101201
2859     *
2860     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2861     */
2862     public static double jauDat(int iy, int im, int id, double fd ) throws JSOFAIllegalParameter, JSOFAInternalError
2863     {
2864 
2865     /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */
2866       final double drift[][] = {
2867           { 37300.0, 0.0012960 },
2868           { 37300.0, 0.0012960 },
2869           { 37300.0, 0.0012960 },
2870           { 37665.0, 0.0011232 },
2871           { 37665.0, 0.0011232 },
2872           { 38761.0, 0.0012960 },
2873           { 38761.0, 0.0012960 },
2874           { 38761.0, 0.0012960 },
2875           { 38761.0, 0.0012960 },
2876           { 38761.0, 0.0012960 },
2877           { 38761.0, 0.0012960 },
2878           { 38761.0, 0.0012960 },
2879           { 39126.0, 0.0025920 },
2880           { 39126.0, 0.0025920 }
2881        };
2882 
2883     /* Number of Delta(AT) expressions before leap seconds were introduced */
2884     final int NERA1 = drift.length;
2885 
2886 
2887     /* Number of Delta(AT) changes */
2888        final int NDAT = leapSeconds.length;
2889 
2890     /* Miscellaneous local variables */
2891        int i, m;
2892        double da, djm;
2893 
2894 
2895     /* Initialize the result to zero. */
2896        double deltat = da = 0.0;
2897 
2898     /* If invalid fraction of a day, set error status and give up. */
2899        if (fd < 0.0 || fd > 1.0) throw new JSOFAIllegalParameter("bad day fraction", -4);
2900 
2901     /* Convert the date into an MJD. */
2902        JulianDate jd = jauCal2jd(iy, im, id);
2903        djm = jd.djm1;
2904 
2905     /* If pre-UTC year, set warning status and give up. */
2906        if (iy < leapSeconds[0].iyear) throw new JSOFAInternalError("year before UTC start", 1);
2907 
2908     /* If suspiciously late year, set warning status but proceed. */
2909        if (iy > IYV + 5) {
2910     }
2911 
2912     /* Combine year and month to form a date-ordered integer... */
2913        m = 12*iy + im;
2914 
2915     /* ...and use it to find the preceding table entry. */
2916        for (i = NDAT-1; i >=0; i--) {
2917           if (m >= (12 * leapSeconds[i].iyear + leapSeconds[i].month)) break;
2918        }
2919 
2920     /* Get the Delta(AT). */
2921        da = leapSeconds[i].delat;
2922 
2923     /* If pre-1972, adjust for drift. */
2924        if (i < NERA1) da += (djm + fd - drift[i][0]) * drift[i][1];
2925 
2926     /* Return the Delta(AT) value. */
2927        deltat = da;
2928 
2929     /* Return the value. */
2930        return deltat;
2931 
2932         }
2933     
2934 
2935     /**
2936     *  An approximation to TDB-TT, the difference between barycentric
2937     *  dynamical time and terrestrial time, for an observer on the Earth.
2938     *
2939     *  The different time scales - proper, coordinate and realized - are
2940     *  related to each other:
2941     *  {@code
2942     *            TAI             <-  physically realized
2943     *             :
2944     *          offset            <-  observed (nominally +32.184s)
2945     *             :
2946     *            TT              <-  terrestrial time
2947     *             :
2948     *    rate adjustment (L_G)   <-  definition of TT
2949     *             :
2950     *            TCG             <-  time scale for GCRS
2951     *             :
2952     *      "periodic" terms      <-  jauDtdb  is an implementation
2953     *             :
2954     *    rate adjustment (L_C)   <-  function of solar-system ephemeris
2955     *             :
2956     *            TCB             <-  time scale for BCRS
2957     *             :
2958     *    rate adjustment (-L_B)  <-  definition of TDB
2959     *             :
2960     *            TDB             <-  TCB scaled to track TT
2961     *             :
2962     *      "periodic" terms      <-  -jau_DTDB is an approximation
2963     *             :
2964     *            TT              <-  terrestrial time
2965     *}
2966     *  Adopted values for the various constants can be found in the IERS
2967     *  Conventions (McCarthy &amp; Petit 2003).
2968     *
2969     *<p>This function is derived from the International Astronomical Union's
2970     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2971     *
2972     *<p>Status:  canonical model.
2973     *
2974     *<!-- Given: -->
2975     *     @param date1 double   date, TDB (Notes 1-3)
2976     *     @param date2 double   date, TDB (Notes 1-3) 
2977     *     @param ut             double   universal time (UT1, fraction of one day)
2978     *     @param elong          double   longitude (east positive, radians)
2979     *     @param u              double   distance from Earth spin axis (km)
2980     *     @param v              double   distance north of equatorial plane (km)
2981     *
2982     * <!-- Returned (function value): -->
2983     *  @return @return             double  TDB-TT (seconds)
2984     *
2985     * <p>Notes:
2986     * <ol>
2987     *
2988     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
2989     *     convenient way between the two arguments.  For example,
2990     *     JD(TT)=2450123.7 could be expressed in any of these ways,
2991     *     among others:
2992     *<pre>
2993     *            date1          date2
2994     *
2995     *         2450123.7           0.0       (JD method)
2996     *         2451545.0       -1421.3       (J2000 method)
2997     *         2400000.5       50123.2       (MJD method)
2998     *         2450123.5           0.2       (date &amp; time method)
2999     *</pre>
3000     *     The JD method is the most natural and convenient to use in
3001     *     cases where the loss of several decimal digits of resolution
3002     *     is acceptable.  The J2000 method is best matched to the way
3003     *     the argument is handled internally and will deliver the
3004     *     optimum resolution.  The MJD method and the date &amp; time methods
3005     *     are both good compromises between resolution and convenience.
3006     *
3007     *     Although the date is, formally, barycentric dynamical time (TDB),
3008     *     the terrestrial dynamical time (TT) can be used with no practical
3009     *     effect on the accuracy of the prediction.
3010     *
3011     * <li> TT can be regarded as a coordinate time that is realized as an
3012     *     offset of 32.184s from International Atomic Time, TAI.  TT is a
3013     *     specific linear transformation of geocentric coordinate time TCG,
3014     *     which is the time scale for the Geocentric Celestial Reference
3015     *     System, GCRS.
3016     *
3017     * <li> TDB is a coordinate time, and is a specific linear transformation
3018     *     of barycentric coordinate time TCB, which is the time scale for
3019     *     the Barycentric Celestial Reference System, BCRS.
3020     *
3021     * <li> The difference TCG-TCB depends on the masses and positions of the
3022     *     bodies of the solar system and the velocity of the Earth.  It is
3023     *     dominated by a rate difference, the residual being of a periodic
3024     *     character.  The latter, which is modeled by the present function,
3025     *     comprises a main (annual) sinusoidal term of amplitude
3026     *     approximately 0.00166 seconds, plus planetary terms up to about
3027     *     20 microseconds, and lunar and diurnal terms up to 2 microseconds.
3028     *     These effects come from the changing transverse Doppler effect
3029     *     and gravitational red-shift as the observer (on the Earth's
3030     *     surface) experiences variations in speed (with respect to the
3031     *     BCRS) and gravitational potential.
3032     *
3033     * <li> TDB can be regarded as the same as TCB but with a rate adjustment
3034     *     to keep it close to TT, which is convenient for many applications.
3035     *     The history of successive attempts to define TDB is set out in
3036     *     Resolution 3 adopted by the IAU General Assembly in 2006, which
3037     *     defines a fixed TDB(TCB) transformation that is consistent with
3038     *     contemporary solar-system ephemerides.  Future ephemerides will
3039     *     imply slightly changed transformations between TCG and TCB, which
3040     *     could introduce a linear drift between TDB and TT;  however, any
3041     *     such drift is unlikely to exceed 1 nanosecond per century.
3042     *
3043     * <li> The geocentric TDB-TT model used in the present function is that of
3044     *     Fairhead &amp; Bretagnon (1990), in its full form.  It was originally
3045     *     supplied by Fairhead (private communications with P.T.Wallace,
3046     *     1990) as a Fortran subroutine.  The present C function contains an
3047     *     adaptation of the Fairhead code.  The numerical results are
3048     *     essentially unaffected by the changes, the differences with
3049     *     respect to the Fairhead &amp; Bretagnon original being at the 1e-20 s
3050     *     level.
3051     *
3052     *     The topocentric part of the model is from Moyer (1981) and
3053     *     Murray (1983), with fundamental arguments adapted from
3054     *     Simon et al. 1994.  It is an approximation to the expression
3055     *     ( v / c ) . ( r / c ), where v is the barycentric velocity of
3056     *     the Earth, r is the geocentric position of the observer and
3057     *     c is the speed of light.
3058     *
3059     *     By supplying zeroes for u and v, the topocentric part of the
3060     *     model can be nullified, and the function will return the Fairhead
3061     *     &amp; Bretagnon result alone.
3062     *
3063     * <li> During the interval 1950-2050, the absolute accuracy is better
3064     *     than +/- 3 nanoseconds relative to time ephemerides obtained by
3065     *     direct numerical integrations based on the JPL DE405 solar system
3066     *     ephemeris.
3067     *
3068     * <li> It must be stressed that the present function is merely a model,
3069     *     and that numerical integration of solar-system ephemerides is the
3070     *     definitive method for predicting the relationship between TCG and
3071     *     TCB and hence between TT and TDB.
3072     *</ol>
3073     *<p>References:
3074     *
3075     *     <p>Fairhead, L., &amp; Bretagnon, P., Astron.Astrophys., 229, 240-247
3076     *     (1990).
3077     *
3078     *     <p>IAU 2006 Resolution 3.
3079     *
3080     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
3081     *     IERS Technical Note No. 32, BKG (2004)
3082     *
3083     *     <p>Moyer, T.D., Cel.Mech., 23, 33 (1981).
3084     *
3085     *     <p>Murray, C.A., Vectorial Astrometry, Adam Hilger (1983).
3086     *
3087     *     <p>Seidelmann, P.K. et al., Explanatory Supplement to the
3088     *     Astronomical Almanac, Chapter 2, University Science Books (1992).
3089     *
3090     *     <p>Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
3091     *     Francou, G. &amp; Laskar, J., Astron.Astrophys., 282, 663-683 (1994).
3092     *
3093     *@version 2009 December 17
3094     *
3095     *  @since Release 20101201
3096     *
3097     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
3098     */
3099     public static  double jauDtdb(double date1, double date2,
3100                    double ut, double elong, double u, double v)
3101     {
3102        double t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4,
3103               wf, wj;
3104        int j;
3105 
3106     /*
3107     * =====================
3108     * Fairhead et al. model
3109     * =====================
3110     *
3111     * 787 sets of three coefficients.
3112     *
3113     * Each set is
3114     *    amplitude (microseconds)
3115     *      frequency (radians per Julian millennium since J2000.0)
3116     *      phase (radians)
3117     *
3118     * Sets   1-474 are the T**0 terms
3119     *  "   475-679  "   "  T**1
3120     *  "   680-764  "   "  T**2
3121     *  "   765-784  "   "  T**3
3122     *  "   785-787  "   "  T**4
3123     */
3124 
3125        final double fairhd[][] = {
3126        /* 1, 10 */
3127           { 1656.674564e-6,     6283.075849991,  6.240054195 },
3128           {   22.417471e-6,     5753.384884897,  4.296977442 },
3129           {   13.839792e-6,    12566.151699983,  6.196904410 },
3130           {    4.770086e-6,      529.690965095,  0.444401603 },
3131           {    4.676740e-6,     6069.776754553,  4.021195093 },
3132           {    2.256707e-6,      213.299095438,  5.543113262 },
3133           {    1.694205e-6,      -3.523118349,   5.025132748 },
3134           {    1.554905e-6,    77713.771467920,  5.198467090 },
3135           {    1.276839e-6,     7860.419392439,  5.988822341 },
3136           {    1.193379e-6,     5223.693919802,  3.649823730 },
3137        /* 11, 20 */
3138           {    1.115322e-6,     3930.209696220,  1.422745069 },
3139           {    0.794185e-6,    11506.769769794,  2.322313077 },
3140           {    0.447061e-6,       26.298319800,  3.615796498 },
3141           {    0.435206e-6,     -398.149003408,  4.349338347 },
3142           {    0.600309e-6,     1577.343542448,  2.678271909 },
3143           {    0.496817e-6,     6208.294251424,  5.696701824 },
3144           {    0.486306e-6,     5884.926846583,  0.520007179 },
3145           {    0.432392e-6,       74.781598567,  2.435898309 },
3146           {    0.468597e-6,     6244.942814354,  5.866398759 },
3147           {    0.375510e-6,     5507.553238667,  4.103476804 },
3148        /* 21, 30 */
3149           {    0.243085e-6,     -775.522611324,  3.651837925 },
3150           {    0.173435e-6,    18849.227549974,  6.153743485 },
3151           {    0.230685e-6,     5856.477659115,  4.773852582 },
3152           {    0.203747e-6,    12036.460734888,  4.333987818 },
3153           {    0.143935e-6,     -796.298006816,  5.957517795 },
3154           {    0.159080e-6,    10977.078804699,  1.890075226 },
3155           {    0.119979e-6,       38.133035638,  4.551585768 },
3156           {    0.118971e-6,     5486.777843175,  1.914547226 },
3157           {    0.116120e-6,     1059.381930189,  0.873504123 },
3158           {    0.137927e-6,    11790.629088659,  1.135934669 },
3159        /* 31, 40 */
3160           {    0.098358e-6,     2544.314419883,  0.092793886 },
3161           {    0.101868e-6,    -5573.142801634,  5.984503847 },
3162           {    0.080164e-6,      206.185548437,  2.095377709 },
3163           {    0.079645e-6,     4694.002954708,  2.949233637 },
3164           {    0.062617e-6,       20.775395492,  2.654394814 },
3165           {    0.075019e-6,     2942.463423292,  4.980931759 },
3166           {    0.064397e-6,     5746.271337896,  1.280308748 },
3167           {    0.063814e-6,     5760.498431898,  4.167901731 },
3168           {    0.048042e-6,     2146.165416475,  1.495846011 },
3169           {    0.048373e-6,      155.420399434,  2.251573730 },
3170        /* 41, 50 */
3171           {    0.058844e-6,      426.598190876,  4.839650148 },
3172           {    0.046551e-6,       -0.980321068,  0.921573539 },
3173           {    0.054139e-6,    17260.154654690,  3.411091093 },
3174           {    0.042411e-6,     6275.962302991,  2.869567043 },
3175           {    0.040184e-6,       -7.113547001,  3.565975565 },
3176           {    0.036564e-6,     5088.628839767,  3.324679049 },
3177           {    0.040759e-6,    12352.852604545,  3.981496998 },
3178           {    0.036507e-6,      801.820931124,  6.248866009 },
3179           {    0.036955e-6,     3154.687084896,  5.071801441 },
3180           {    0.042732e-6,      632.783739313,  5.720622217 },
3181        /* 51, 60 */
3182           {    0.042560e-6,   161000.685737473,  1.270837679 },
3183           {    0.040480e-6,    15720.838784878,  2.546610123 },
3184           {    0.028244e-6,    -6286.598968340,  5.069663519 },
3185           {    0.033477e-6,     6062.663207553,  4.144987272 },
3186           {    0.034867e-6,      522.577418094,  5.210064075 },
3187           {    0.032438e-6,     6076.890301554,  0.749317412 },
3188           {    0.030215e-6,     7084.896781115,  3.389610345 },
3189           {    0.029247e-6,   -71430.695617928,  4.183178762 },
3190           {    0.033529e-6,     9437.762934887,  2.404714239 },
3191           {    0.032423e-6,     8827.390269875,  5.541473556 },
3192        /* 61, 70 */
3193           {    0.027567e-6,     6279.552731642,  5.040846034 },
3194           {    0.029862e-6,    12139.553509107,  1.770181024 },
3195           {    0.022509e-6,    10447.387839604,  1.460726241 },
3196           {    0.020937e-6,     8429.241266467,  0.652303414 },
3197           {    0.020322e-6,      419.484643875,  3.735430632 },
3198           {    0.024816e-6,    -1194.447010225,  1.087136918 },
3199           {    0.025196e-6,     1748.016413067,  2.901883301 },
3200           {    0.021691e-6,    14143.495242431,  5.952658009 },
3201           {    0.017673e-6,     6812.766815086,  3.186129845 },
3202           {    0.022567e-6,     6133.512652857,  3.307984806 },
3203        /* 71, 80 */
3204           {    0.016155e-6,    10213.285546211,  1.331103168 },
3205           {    0.014751e-6,     1349.867409659,  4.308933301 },
3206           {    0.015949e-6,     -220.412642439,  4.005298270 },
3207           {    0.015974e-6,    -2352.866153772,  6.145309371 },
3208           {    0.014223e-6,    17789.845619785,  2.104551349 },
3209           {    0.017806e-6,       73.297125859,  3.475975097 },
3210           {    0.013671e-6,     -536.804512095,  5.971672571 },
3211           {    0.011942e-6,     8031.092263058,  2.053414715 },
3212           {    0.014318e-6,    16730.463689596,  3.016058075 },
3213           {    0.012462e-6,      103.092774219,  1.737438797 },
3214        /* 81, 90 */
3215           {    0.010962e-6,        3.590428652,  2.196567739 },
3216           {    0.015078e-6,    19651.048481098,  3.969480770 },
3217           {    0.010396e-6,      951.718406251,  5.717799605 },
3218           {    0.011707e-6,    -4705.732307544,  2.654125618 },
3219           {    0.010453e-6,     5863.591206116,  1.913704550 },
3220           {    0.012420e-6,     4690.479836359,  4.734090399 },
3221           {    0.011847e-6,     5643.178563677,  5.489005403 },
3222           {    0.008610e-6,     3340.612426700,  3.661698944 },
3223           {    0.011622e-6,     5120.601145584,  4.863931876 },
3224           {    0.010825e-6,      553.569402842,  0.842715011 },
3225        /* 91, 100 */
3226           {    0.008666e-6,     -135.065080035,  3.293406547 },
3227           {    0.009963e-6,      149.563197135,  4.870690598 },
3228           {    0.009858e-6,     6309.374169791,  1.061816410 },
3229           {    0.007959e-6,      316.391869657,  2.465042647 },
3230           {    0.010099e-6,      283.859318865,  1.942176992 },
3231           {    0.007147e-6,     -242.728603974,  3.661486981 },
3232           {    0.007505e-6,     5230.807466803,  4.920937029 },
3233           {    0.008323e-6,    11769.853693166,  1.229392026 },
3234           {    0.007490e-6,    -6256.777530192,  3.658444681 },
3235           {    0.009370e-6,   149854.400134205,  0.673880395 },
3236        /* 101, 110 */
3237           {    0.007117e-6,       38.027672636,  5.294249518 },
3238           {    0.007857e-6,    12168.002696575,  0.525733528 },
3239           {    0.007019e-6,     6206.809778716,  0.837688810 },
3240           {    0.006056e-6,      955.599741609,  4.194535082 },
3241           {    0.008107e-6,    13367.972631107,  3.793235253 },
3242           {    0.006731e-6,     5650.292110678,  5.639906583 },
3243           {    0.007332e-6,       36.648562930,  0.114858677 },
3244           {    0.006366e-6,     4164.311989613,  2.262081818 },
3245           {    0.006858e-6,     5216.580372801,  0.642063318 },
3246           {    0.006919e-6,     6681.224853400,  6.018501522 },
3247        /* 111, 120 */
3248           {    0.006826e-6,     7632.943259650,  3.458654112 },
3249           {    0.005308e-6,    -1592.596013633,  2.500382359 },
3250           {    0.005096e-6,    11371.704689758,  2.547107806 },
3251           {    0.004841e-6,     5333.900241022,  0.437078094 },
3252           {    0.005582e-6,     5966.683980335,  2.246174308 },
3253           {    0.006304e-6,    11926.254413669,  2.512929171 },
3254           {    0.006603e-6,    23581.258177318,  5.393136889 },
3255           {    0.005123e-6,       -1.484472708,  2.999641028 },
3256           {    0.004648e-6,     1589.072895284,  1.275847090 },
3257           {    0.005119e-6,     6438.496249426,  1.486539246 },
3258        /* 121, 130 */
3259           {    0.004521e-6,     4292.330832950,  6.140635794 },
3260           {    0.005680e-6,    23013.539539587,  4.557814849 },
3261           {    0.005488e-6,       -3.455808046,  0.090675389 },
3262           {    0.004193e-6,     7234.794256242,  4.869091389 },
3263           {    0.003742e-6,     7238.675591600,  4.691976180 },
3264           {    0.004148e-6,     -110.206321219,  3.016173439 },
3265           {    0.004553e-6,    11499.656222793,  5.554998314 },
3266           {    0.004892e-6,     5436.993015240,  1.475415597 },
3267           {    0.004044e-6,     4732.030627343,  1.398784824 },
3268           {    0.004164e-6,    12491.370101415,  5.650931916 },
3269        /* 131, 140 */
3270           {    0.004349e-6,    11513.883316794,  2.181745369 },
3271           {    0.003919e-6,    12528.018664345,  5.823319737 },
3272           {    0.003129e-6,     6836.645252834,  0.003844094 },
3273           {    0.004080e-6,    -7058.598461315,  3.690360123 },
3274           {    0.003270e-6,       76.266071276,  1.517189902 },
3275           {    0.002954e-6,     6283.143160294,  4.447203799 },
3276           {    0.002872e-6,       28.449187468,  1.158692983 },
3277           {    0.002881e-6,      735.876513532,  0.349250250 },
3278           {    0.003279e-6,     5849.364112115,  4.893384368 },
3279           {    0.003625e-6,     6209.778724132,  1.473760578 },
3280        /* 141, 150 */
3281           {    0.003074e-6,      949.175608970,  5.185878737 },
3282           {    0.002775e-6,     9917.696874510,  1.030026325 },
3283           {    0.002646e-6,    10973.555686350,  3.918259169 },
3284           {    0.002575e-6,    25132.303399966,  6.109659023 },
3285           {    0.003500e-6,      263.083923373,  1.892100742 },
3286           {    0.002740e-6,    18319.536584880,  4.320519510 },
3287           {    0.002464e-6,      202.253395174,  4.698203059 },
3288           {    0.002409e-6,        2.542797281,  5.325009315 },
3289           {    0.003354e-6,   -90955.551694697,  1.942656623 },
3290           {    0.002296e-6,     6496.374945429,  5.061810696 },
3291        /* 151, 160 */
3292           {    0.003002e-6,     6172.869528772,  2.797822767 },
3293           {    0.003202e-6,    27511.467873537,  0.531673101 },
3294           {    0.002954e-6,    -6283.008539689,  4.533471191 },
3295           {    0.002353e-6,      639.897286314,  3.734548088 },
3296           {    0.002401e-6,    16200.772724501,  2.605547070 },
3297           {    0.003053e-6,   233141.314403759,  3.029030662 },
3298           {    0.003024e-6,    83286.914269554,  2.355556099 },
3299           {    0.002863e-6,    17298.182327326,  5.240963796 },
3300           {    0.002103e-6,    -7079.373856808,  5.756641637 },
3301           {    0.002303e-6,    83996.847317911,  2.013686814 },
3302        /* 161, 170 */
3303           {    0.002303e-6,    18073.704938650,  1.089100410 },
3304           {    0.002381e-6,       63.735898303,  0.759188178 },
3305           {    0.002493e-6,     6386.168624210,  0.645026535 },
3306           {    0.002366e-6,        3.932153263,  6.215885448 },
3307           {    0.002169e-6,    11015.106477335,  4.845297676 },
3308           {    0.002397e-6,     6243.458341645,  3.809290043 },
3309           {    0.002183e-6,     1162.474704408,  6.179611691 },
3310           {    0.002353e-6,     6246.427287062,  4.781719760 },
3311           {    0.002199e-6,     -245.831646229,  5.956152284 },
3312           {    0.001729e-6,     3894.181829542,  1.264976635 },
3313        /* 171, 180 */
3314           {    0.001896e-6,    -3128.388765096,  4.914231596 },
3315           {    0.002085e-6,       35.164090221,  1.405158503 },
3316           {    0.002024e-6,    14712.317116458,  2.752035928 },
3317           {    0.001737e-6,     6290.189396992,  5.280820144 },
3318           {    0.002229e-6,      491.557929457,  1.571007057 },
3319           {    0.001602e-6,    14314.168113050,  4.203664806 },
3320           {    0.002186e-6,      454.909366527,  1.402101526 },
3321           {    0.001897e-6,    22483.848574493,  4.167932508 },
3322           {    0.001825e-6,    -3738.761430108,  0.545828785 },
3323           {    0.001894e-6,     1052.268383188,  5.817167450 },
3324        /* 181, 190 */
3325           {    0.001421e-6,       20.355319399,  2.419886601 },
3326           {    0.001408e-6,    10984.192351700,  2.732084787 },
3327           {    0.001847e-6,    10873.986030480,  2.903477885 },
3328           {    0.001391e-6,    -8635.942003763,  0.593891500 },
3329           {    0.001388e-6,       -7.046236698,  1.166145902 },
3330           {    0.001810e-6,   -88860.057071188,  0.487355242 },
3331           {    0.001288e-6,    -1990.745017041,  3.913022880 },
3332           {    0.001297e-6,    23543.230504682,  3.063805171 },
3333           {    0.001335e-6,     -266.607041722,  3.995764039 },
3334           {    0.001376e-6,    10969.965257698,  5.152914309 },
3335        /* 191, 200 */
3336           {    0.001745e-6,   244287.600007027,  3.626395673 },
3337           {    0.001649e-6,    31441.677569757,  1.952049260 },
3338           {    0.001416e-6,     9225.539273283,  4.996408389 },
3339           {    0.001238e-6,     4804.209275927,  5.503379738 },
3340           {    0.001472e-6,     4590.910180489,  4.164913291 },
3341           {    0.001169e-6,     6040.347246017,  5.841719038 },
3342           {    0.001039e-6,     5540.085789459,  2.769753519 },
3343           {    0.001004e-6,     -170.672870619,  0.755008103 },
3344           {    0.001284e-6,    10575.406682942,  5.306538209 },
3345           {    0.001278e-6,       71.812653151,  4.713486491 },
3346        /* 201, 210 */
3347           {    0.001321e-6,    18209.330263660,  2.624866359 },
3348           {    0.001297e-6,    21228.392023546,  0.382603541 },
3349           {    0.000954e-6,     6282.095528923,  0.882213514 },
3350           {    0.001145e-6,     6058.731054289,  1.169483931 },
3351           {    0.000979e-6,     5547.199336460,  5.448375984 },
3352           {    0.000987e-6,    -6262.300454499,  2.656486959 },
3353           {    0.001070e-6,  -154717.609887482,  1.827624012 },
3354           {    0.000991e-6,     4701.116501708,  4.387001801 },
3355           {    0.001155e-6,      -14.227094002,  3.042700750 },
3356           {    0.001176e-6,      277.034993741,  3.335519004 },
3357        /* 211, 220 */
3358           {    0.000890e-6,    13916.019109642,  5.601498297 },
3359           {    0.000884e-6,    -1551.045222648,  1.088831705 },
3360           {    0.000876e-6,     5017.508371365,  3.969902609 },
3361           {    0.000806e-6,    15110.466119866,  5.142876744 },
3362           {    0.000773e-6,    -4136.910433516,  0.022067765 },
3363           {    0.001077e-6,      175.166059800,  1.844913056 },
3364           {    0.000954e-6,    -6284.056171060,  0.968480906 },
3365           {    0.000737e-6,     5326.786694021,  4.923831588 },
3366           {    0.000845e-6,     -433.711737877,  4.749245231 },
3367           {    0.000819e-6,     8662.240323563,  5.991247817 },
3368        /* 221, 230 */
3369           {    0.000852e-6,      199.072001436,  2.189604979 },
3370           {    0.000723e-6,    17256.631536341,  6.068719637 },
3371           {    0.000940e-6,     6037.244203762,  6.197428148 },
3372           {    0.000885e-6,    11712.955318231,  3.280414875 },
3373           {    0.000706e-6,    12559.038152982,  2.824848947 },
3374           {    0.000732e-6,     2379.164473572,  2.501813417 },
3375           {    0.000764e-6,    -6127.655450557,  2.236346329 },
3376           {    0.000908e-6,      131.541961686,  2.521257490 },
3377           {    0.000907e-6,    35371.887265976,  3.370195967 },
3378           {    0.000673e-6,     1066.495477190,  3.876512374 },
3379        /* 231, 240 */
3380           {    0.000814e-6,    17654.780539750,  4.627122566 },
3381           {    0.000630e-6,       36.027866677,  0.156368499 },
3382           {    0.000798e-6,      515.463871093,  5.151962502 },
3383           {    0.000798e-6,      148.078724426,  5.909225055 },
3384           {    0.000806e-6,      309.278322656,  6.054064447 },
3385           {    0.000607e-6,      -39.617508346,  2.839021623 },
3386           {    0.000601e-6,      412.371096874,  3.984225404 },
3387           {    0.000646e-6,    11403.676995575,  3.852959484 },
3388           {    0.000704e-6,    13521.751441591,  2.300991267 },
3389           {    0.000603e-6,   -65147.619767937,  4.140083146 },
3390        /* 241, 250 */
3391           {    0.000609e-6,    10177.257679534,  0.437122327 },
3392           {    0.000631e-6,     5767.611978898,  4.026532329 },
3393           {    0.000576e-6,    11087.285125918,  4.760293101 },
3394           {    0.000674e-6,    14945.316173554,  6.270510511 },
3395           {    0.000726e-6,     5429.879468239,  6.039606892 },
3396           {    0.000710e-6,    28766.924424484,  5.672617711 },
3397           {    0.000647e-6,    11856.218651625,  3.397132627 },
3398           {    0.000678e-6,    -5481.254918868,  6.249666675 },
3399           {    0.000618e-6,    22003.914634870,  2.466427018 },
3400           {    0.000738e-6,     6134.997125565,  2.242668890 },
3401        /* 251, 260 */
3402           {    0.000660e-6,      625.670192312,  5.864091907 },
3403           {    0.000694e-6,     3496.032826134,  2.668309141 },
3404           {    0.000531e-6,     6489.261398429,  1.681888780 },
3405           {    0.000611e-6,  -143571.324284214,  2.424978312 },
3406           {    0.000575e-6,    12043.574281889,  4.216492400 },
3407           {    0.000553e-6,    12416.588502848,  4.772158039 },
3408           {    0.000689e-6,     4686.889407707,  6.224271088 },
3409           {    0.000495e-6,     7342.457780181,  3.817285811 },
3410           {    0.000567e-6,     3634.621024518,  1.649264690 },
3411           {    0.000515e-6,    18635.928454536,  3.945345892 },
3412        /* 261, 270 */
3413           {    0.000486e-6,     -323.505416657,  4.061673868 },
3414           {    0.000662e-6,    25158.601719765,  1.794058369 },
3415           {    0.000509e-6,      846.082834751,  3.053874588 },
3416           {    0.000472e-6,   -12569.674818332,  5.112133338 },
3417           {    0.000461e-6,     6179.983075773,  0.513669325 },
3418           {    0.000641e-6,    83467.156352816,  3.210727723 },
3419           {    0.000520e-6,    10344.295065386,  2.445597761 },
3420           {    0.000493e-6,    18422.629359098,  1.676939306 },
3421           {    0.000478e-6,     1265.567478626,  5.487314569 },
3422           {    0.000472e-6,      -18.159247265,  1.999707589 },
3423        /* 271, 280 */
3424           {    0.000559e-6,    11190.377900137,  5.783236356 },
3425           {    0.000494e-6,     9623.688276691,  3.022645053 },
3426           {    0.000463e-6,     5739.157790895,  1.411223013 },
3427           {    0.000432e-6,    16858.482532933,  1.179256434 },
3428           {    0.000574e-6,    72140.628666286,  1.758191830 },
3429           {    0.000484e-6,    17267.268201691,  3.290589143 },
3430           {    0.000550e-6,     4907.302050146,  0.864024298 },
3431           {    0.000399e-6,       14.977853527,  2.094441910 },
3432           {    0.000491e-6,      224.344795702,  0.878372791 },
3433           {    0.000432e-6,    20426.571092422,  6.003829241 },
3434        /* 281, 290 */
3435           {    0.000481e-6,     5749.452731634,  4.309591964 },
3436           {    0.000480e-6,     5757.317038160,  1.142348571 },
3437           {    0.000485e-6,     6702.560493867,  0.210580917 },
3438           {    0.000426e-6,     6055.549660552,  4.274476529 },
3439           {    0.000480e-6,     5959.570433334,  5.031351030 },
3440           {    0.000466e-6,    12562.628581634,  4.959581597 },
3441           {    0.000520e-6,    39302.096962196,  4.788002889 },
3442           {    0.000458e-6,    12132.439962106,  1.880103788 },
3443           {    0.000470e-6,    12029.347187887,  1.405611197 },
3444           {    0.000416e-6,    -7477.522860216,  1.082356330 },
3445        /* 291, 300 */
3446           {    0.000449e-6,    11609.862544012,  4.179989585 },
3447           {    0.000465e-6,    17253.041107690,  0.353496295 },
3448           {    0.000362e-6,    -4535.059436924,  1.583849576 },
3449           {    0.000383e-6,    21954.157609398,  3.747376371 },
3450           {    0.000389e-6,       17.252277143,  1.395753179 },
3451           {    0.000331e-6,    18052.929543158,  0.566790582 },
3452           {    0.000430e-6,    13517.870106233,  0.685827538 },
3453           {    0.000368e-6,    -5756.908003246,  0.731374317 },
3454           {    0.000330e-6,    10557.594160824,  3.710043680 },
3455           {    0.000332e-6,    20199.094959633,  1.652901407 },
3456        /* 301, 310 */
3457           {    0.000384e-6,    11933.367960670,  5.827781531 },
3458           {    0.000387e-6,    10454.501386605,  2.541182564 },
3459           {    0.000325e-6,    15671.081759407,  2.178850542 },
3460           {    0.000318e-6,      138.517496871,  2.253253037 },
3461           {    0.000305e-6,     9388.005909415,  0.578340206 },
3462           {    0.000352e-6,     5749.861766548,  3.000297967 },
3463           {    0.000311e-6,     6915.859589305,  1.693574249 },
3464           {    0.000297e-6,    24072.921469776,  1.997249392 },
3465           {    0.000363e-6,     -640.877607382,  5.071820966 },
3466           {    0.000323e-6,    12592.450019783,  1.072262823 },
3467        /* 311, 320 */
3468           {    0.000341e-6,    12146.667056108,  4.700657997 },
3469           {    0.000290e-6,     9779.108676125,  1.812320441 },
3470           {    0.000342e-6,     6132.028180148,  4.322238614 },
3471           {    0.000329e-6,     6268.848755990,  3.033827743 },
3472           {    0.000374e-6,    17996.031168222,  3.388716544 },
3473           {    0.000285e-6,     -533.214083444,  4.687313233 },
3474           {    0.000338e-6,     6065.844601290,  0.877776108 },
3475           {    0.000276e-6,       24.298513841,  0.770299429 },
3476           {    0.000336e-6,    -2388.894020449,  5.353796034 },
3477           {    0.000290e-6,     3097.883822726,  4.075291557 },
3478        /* 321, 330 */
3479           {    0.000318e-6,      709.933048357,  5.941207518 },
3480           {    0.000271e-6,    13095.842665077,  3.208912203 },
3481           {    0.000331e-6,     6073.708907816,  4.007881169 },
3482           {    0.000292e-6,      742.990060533,  2.714333592 },
3483           {    0.000362e-6,    29088.811415985,  3.215977013 },
3484           {    0.000280e-6,    12359.966151546,  0.710872502 },
3485           {    0.000267e-6,    10440.274292604,  4.730108488 },
3486           {    0.000262e-6,      838.969287750,  1.327720272 },
3487           {    0.000250e-6,    16496.361396202,  0.898769761 },
3488           {    0.000325e-6,    20597.243963041,  0.180044365 },
3489        /* 331, 340 */
3490           {    0.000268e-6,     6148.010769956,  5.152666276 },
3491           {    0.000284e-6,     5636.065016677,  5.655385808 },
3492           {    0.000301e-6,     6080.822454817,  2.135396205 },
3493           {    0.000294e-6,     -377.373607916,  3.708784168 },
3494           {    0.000236e-6,     2118.763860378,  1.733578756 },
3495           {    0.000234e-6,     5867.523359379,  5.575209112 },
3496           {    0.000268e-6,  -226858.238553767,  0.069432392 },
3497           {    0.000265e-6,   167283.761587465,  4.369302826 },
3498           {    0.000280e-6,    28237.233459389,  5.304829118 },
3499           {    0.000292e-6,    12345.739057544,  4.096094132 },
3500        /* 341, 350 */
3501           {    0.000223e-6,    19800.945956225,  3.069327406 },
3502           {    0.000301e-6,    43232.306658416,  6.205311188 },
3503           {    0.000264e-6,    18875.525869774,  1.417263408 },
3504           {    0.000304e-6,    -1823.175188677,  3.409035232 },
3505           {    0.000301e-6,      109.945688789,  0.510922054 },
3506           {    0.000260e-6,      813.550283960,  2.389438934 },
3507           {    0.000299e-6,   316428.228673312,  5.384595078 },
3508           {    0.000211e-6,     5756.566278634,  3.789392838 },
3509           {    0.000209e-6,     5750.203491159,  1.661943545 },
3510           {    0.000240e-6,    12489.885628707,  5.684549045 },
3511        /* 351, 360 */
3512           {    0.000216e-6,     6303.851245484,  3.862942261 },
3513           {    0.000203e-6,     1581.959348283,  5.549853589 },
3514           {    0.000200e-6,     5642.198242609,  1.016115785 },
3515           {    0.000197e-6,      -70.849445304,  4.690702525 },
3516           {    0.000227e-6,     6287.008003254,  2.911891613 },
3517           {    0.000197e-6,      533.623118358,  1.048982898 },
3518           {    0.000205e-6,    -6279.485421340,  1.829362730 },
3519           {    0.000209e-6,   -10988.808157535,  2.636140084 },
3520           {    0.000208e-6,     -227.526189440,  4.127883842 },
3521           {    0.000191e-6,      415.552490612,  4.401165650 },
3522        /* 361, 370 */
3523           {    0.000190e-6,    29296.615389579,  4.175658539 },
3524           {    0.000264e-6,    66567.485864652,  4.601102551 },
3525           {    0.000256e-6,    -3646.350377354,  0.506364778 },
3526           {    0.000188e-6,    13119.721102825,  2.032195842 },
3527           {    0.000185e-6,     -209.366942175,  4.694756586 },
3528           {    0.000198e-6,    25934.124331089,  3.832703118 },
3529           {    0.000195e-6,     4061.219215394,  3.308463427 },
3530           {    0.000234e-6,     5113.487598583,  1.716090661 },
3531           {    0.000188e-6,     1478.866574064,  5.686865780 },
3532           {    0.000222e-6,    11823.161639450,  1.942386641 },
3533        /* 371, 380 */
3534           {    0.000181e-6,    10770.893256262,  1.999482059 },
3535           {    0.000171e-6,     6546.159773364,  1.182807992 },
3536           {    0.000206e-6,       70.328180442,  5.934076062 },
3537           {    0.000169e-6,    20995.392966449,  2.169080622 },
3538           {    0.000191e-6,    10660.686935042,  5.405515999 },
3539           {    0.000228e-6,    33019.021112205,  4.656985514 },
3540           {    0.000184e-6,    -4933.208440333,  3.327476868 },
3541           {    0.000220e-6,     -135.625325010,  1.765430262 },
3542           {    0.000166e-6,    23141.558382925,  3.454132746 },
3543           {    0.000191e-6,     6144.558353121,  5.020393445 },
3544        /* 381, 390 */
3545           {    0.000180e-6,     6084.003848555,  0.602182191 },
3546           {    0.000163e-6,    17782.732072784,  4.960593133 },
3547           {    0.000225e-6,    16460.333529525,  2.596451817 },
3548           {    0.000222e-6,     5905.702242076,  3.731990323 },
3549           {    0.000204e-6,      227.476132789,  5.636192701 },
3550           {    0.000159e-6,    16737.577236597,  3.600691544 },
3551           {    0.000200e-6,     6805.653268085,  0.868220961 },
3552           {    0.000187e-6,    11919.140866668,  2.629456641 },
3553           {    0.000161e-6,      127.471796607,  2.862574720 },
3554           {    0.000205e-6,     6286.666278643,  1.742882331 },
3555        /* 391, 400 */
3556           {    0.000189e-6,      153.778810485,  4.812372643 },
3557           {    0.000168e-6,    16723.350142595,  0.027860588 },
3558           {    0.000149e-6,    11720.068865232,  0.659721876 },
3559           {    0.000189e-6,     5237.921013804,  5.245313000 },
3560           {    0.000143e-6,     6709.674040867,  4.317625647 },
3561           {    0.000146e-6,     4487.817406270,  4.815297007 },
3562           {    0.000144e-6,     -664.756045130,  5.381366880 },
3563           {    0.000175e-6,     5127.714692584,  4.728443327 },
3564           {    0.000162e-6,     6254.626662524,  1.435132069 },
3565           {    0.000187e-6,    47162.516354635,  1.354371923 },
3566        /* 401, 410 */
3567           {    0.000146e-6,    11080.171578918,  3.369695406 },
3568           {    0.000180e-6,     -348.924420448,  2.490902145 },
3569           {    0.000148e-6,      151.047669843,  3.799109588 },
3570           {    0.000157e-6,     6197.248551160,  1.284375887 },
3571           {    0.000167e-6,      146.594251718,  0.759969109 },
3572           {    0.000133e-6,    -5331.357443741,  5.409701889 },
3573           {    0.000154e-6,       95.979227218,  3.366890614 },
3574           {    0.000148e-6,    -6418.140930027,  3.384104996 },
3575           {    0.000128e-6,    -6525.804453965,  3.803419985 },
3576           {    0.000130e-6,    11293.470674356,  0.939039445 },
3577        /* 411, 420 */
3578           {    0.000152e-6,    -5729.506447149,  0.734117523 },
3579           {    0.000138e-6,      210.117701700,  2.564216078 },
3580           {    0.000123e-6,     6066.595360816,  4.517099537 },
3581           {    0.000140e-6,    18451.078546566,  0.642049130 },
3582           {    0.000126e-6,    11300.584221356,  3.485280663 },
3583           {    0.000119e-6,    10027.903195729,  3.217431161 },
3584           {    0.000151e-6,     4274.518310832,  4.404359108 },
3585           {    0.000117e-6,     6072.958148291,  0.366324650 },
3586           {    0.000165e-6,    -7668.637425143,  4.298212528 },
3587           {    0.000117e-6,    -6245.048177356,  5.379518958 },
3588        /* 421, 430 */
3589           {    0.000130e-6,    -5888.449964932,  4.527681115 },
3590           {    0.000121e-6,     -543.918059096,  6.109429504 },
3591           {    0.000162e-6,     9683.594581116,  5.720092446 },
3592           {    0.000141e-6,     6219.339951688,  0.679068671 },
3593           {    0.000118e-6,    22743.409379516,  4.881123092 },
3594           {    0.000129e-6,     1692.165669502,  0.351407289 },
3595           {    0.000126e-6,     5657.405657679,  5.146592349 },
3596           {    0.000114e-6,      728.762966531,  0.520791814 },
3597           {    0.000120e-6,       52.596639600,  0.948516300 },
3598           {    0.000115e-6,       65.220371012,  3.504914846 },
3599        /* 431, 440 */
3600           {    0.000126e-6,     5881.403728234,  5.577502482 },
3601           {    0.000158e-6,   163096.180360983,  2.957128968 },
3602           {    0.000134e-6,    12341.806904281,  2.598576764 },
3603           {    0.000151e-6,    16627.370915377,  3.985702050 },
3604           {    0.000109e-6,     1368.660252845,  0.014730471 },
3605           {    0.000131e-6,     6211.263196841,  0.085077024 },
3606           {    0.000146e-6,     5792.741760812,  0.708426604 },
3607           {    0.000146e-6,      -77.750543984,  3.121576600 },
3608           {    0.000107e-6,     5341.013788022,  0.288231904 },
3609           {    0.000138e-6,     6281.591377283,  2.797450317 },
3610        /* 441, 450 */
3611           {    0.000113e-6,    -6277.552925684,  2.788904128 },
3612           {    0.000115e-6,     -525.758811831,  5.895222200 },
3613           {    0.000138e-6,     6016.468808270,  6.096188999 },
3614           {    0.000139e-6,    23539.707386333,  2.028195445 },
3615           {    0.000146e-6,    -4176.041342449,  4.660008502 },
3616           {    0.000107e-6,    16062.184526117,  4.066520001 },
3617           {    0.000142e-6,    83783.548222473,  2.936315115 },
3618           {    0.000128e-6,     9380.959672717,  3.223844306 },
3619           {    0.000135e-6,     6205.325306007,  1.638054048 },
3620           {    0.000101e-6,     2699.734819318,  5.481603249 },
3621        /* 451, 460 */
3622           {    0.000104e-6,     -568.821874027,  2.205734493 },
3623           {    0.000103e-6,     6321.103522627,  2.440421099 },
3624           {    0.000119e-6,     6321.208885629,  2.547496264 },
3625           {    0.000138e-6,     1975.492545856,  2.314608466 },
3626           {    0.000121e-6,      137.033024162,  4.539108237 },
3627           {    0.000123e-6,    19402.796952817,  4.538074405 },
3628           {    0.000119e-6,    22805.735565994,  2.869040566 },
3629           {    0.000133e-6,    64471.991241142,  6.056405489 },
3630           {    0.000129e-6,      -85.827298831,  2.540635083 },
3631           {    0.000131e-6,    13613.804277336,  4.005732868 },
3632        /* 461, 470 */
3633           {    0.000104e-6,     9814.604100291,  1.959967212 },
3634           {    0.000112e-6,    16097.679950283,  3.589026260 },
3635           {    0.000123e-6,     2107.034507542,  1.728627253 },
3636           {    0.000121e-6,    36949.230808424,  6.072332087 },
3637           {    0.000108e-6,   -12539.853380183,  3.716133846 },
3638           {    0.000113e-6,    -7875.671863624,  2.725771122 },
3639           {    0.000109e-6,     4171.425536614,  4.033338079 },
3640           {    0.000101e-6,     6247.911759770,  3.441347021 },
3641           {    0.000113e-6,     7330.728427345,  0.656372122 },
3642           {    0.000113e-6,    51092.726050855,  2.791483066 },
3643        /* 471, 480 */
3644           {    0.000106e-6,     5621.842923210,  1.815323326 },
3645           {    0.000101e-6,      111.430161497,  5.711033677 },
3646           {    0.000103e-6,      909.818733055,  2.812745443 },
3647           {    0.000101e-6,     1790.642637886,  1.965746028 },
3648 
3649        /* T */
3650           {  102.156724e-6,     6283.075849991,  4.249032005 },
3651           {    1.706807e-6,    12566.151699983,  4.205904248 },
3652           {    0.269668e-6,      213.299095438,  3.400290479 },
3653           {    0.265919e-6,      529.690965095,  5.836047367 },
3654           {    0.210568e-6,       -3.523118349,  6.262738348 },
3655           {    0.077996e-6,     5223.693919802,  4.670344204 },
3656        /* 481, 490 */
3657           {    0.054764e-6,     1577.343542448,  4.534800170 },
3658           {    0.059146e-6,       26.298319800,  1.083044735 },
3659           {    0.034420e-6,     -398.149003408,  5.980077351 },
3660           {    0.032088e-6,    18849.227549974,  4.162913471 },
3661           {    0.033595e-6,     5507.553238667,  5.980162321 },
3662           {    0.029198e-6,     5856.477659115,  0.623811863 },
3663           {    0.027764e-6,      155.420399434,  3.745318113 },
3664           {    0.025190e-6,     5746.271337896,  2.980330535 },
3665           {    0.022997e-6,     -796.298006816,  1.174411803 },
3666           {    0.024976e-6,     5760.498431898,  2.467913690 },
3667        /* 491, 500 */
3668           {    0.021774e-6,      206.185548437,  3.854787540 },
3669           {    0.017925e-6,     -775.522611324,  1.092065955 },
3670           {    0.013794e-6,      426.598190876,  2.699831988 },
3671           {    0.013276e-6,     6062.663207553,  5.845801920 },
3672           {    0.011774e-6,    12036.460734888,  2.292832062 },
3673           {    0.012869e-6,     6076.890301554,  5.333425680 },
3674           {    0.012152e-6,     1059.381930189,  6.222874454 },
3675           {    0.011081e-6,       -7.113547001,  5.154724984 },
3676           {    0.010143e-6,     4694.002954708,  4.044013795 },
3677           {    0.009357e-6,     5486.777843175,  3.416081409 },
3678        /* 501, 510 */
3679           {    0.010084e-6,      522.577418094,  0.749320262 },
3680           {    0.008587e-6,    10977.078804699,  2.777152598 },
3681           {    0.008628e-6,     6275.962302991,  4.562060226 },
3682           {    0.008158e-6,     -220.412642439,  5.806891533 },
3683           {    0.007746e-6,     2544.314419883,  1.603197066 },
3684           {    0.007670e-6,     2146.165416475,  3.000200440 },
3685           {    0.007098e-6,       74.781598567,  0.443725817 },
3686           {    0.006180e-6,     -536.804512095,  1.302642751 },
3687           {    0.005818e-6,     5088.628839767,  4.827723531 },
3688           {    0.004945e-6,    -6286.598968340,  0.268305170 },
3689        /* 511, 520 */
3690           {    0.004774e-6,     1349.867409659,  5.808636673 },
3691           {    0.004687e-6,     -242.728603974,  5.154890570 },
3692           {    0.006089e-6,     1748.016413067,  4.403765209 },
3693           {    0.005975e-6,    -1194.447010225,  2.583472591 },
3694           {    0.004229e-6,      951.718406251,  0.931172179 },
3695           {    0.005264e-6,      553.569402842,  2.336107252 },
3696           {    0.003049e-6,     5643.178563677,  1.362634430 },
3697           {    0.002974e-6,     6812.766815086,  1.583012668 },
3698           {    0.003403e-6,    -2352.866153772,  2.552189886 },
3699           {    0.003030e-6,      419.484643875,  5.286473844 },
3700        /* 521, 530 */
3701           {    0.003210e-6,       -7.046236698,  1.863796539 },
3702           {    0.003058e-6,     9437.762934887,  4.226420633 },
3703           {    0.002589e-6,    12352.852604545,  1.991935820 },
3704           {    0.002927e-6,     5216.580372801,  2.319951253 },
3705           {    0.002425e-6,     5230.807466803,  3.084752833 },
3706           {    0.002656e-6,     3154.687084896,  2.487447866 },
3707           {    0.002445e-6,    10447.387839604,  2.347139160 },
3708           {    0.002990e-6,     4690.479836359,  6.235872050 },
3709           {    0.002890e-6,     5863.591206116,  0.095197563 },
3710           {    0.002498e-6,     6438.496249426,  2.994779800 },
3711        /* 531, 540 */
3712           {    0.001889e-6,     8031.092263058,  3.569003717 },
3713           {    0.002567e-6,      801.820931124,  3.425611498 },
3714           {    0.001803e-6,   -71430.695617928,  2.192295512 },
3715           {    0.001782e-6,        3.932153263,  5.180433689 },
3716           {    0.001694e-6,    -4705.732307544,  4.641779174 },
3717           {    0.001704e-6,    -1592.596013633,  3.997097652 },
3718           {    0.001735e-6,     5849.364112115,  0.417558428 },
3719           {    0.001643e-6,     8429.241266467,  2.180619584 },
3720           {    0.001680e-6,       38.133035638,  4.164529426 },
3721           {    0.002045e-6,     7084.896781115,  0.526323854 },
3722        /* 541, 550 */
3723           {    0.001458e-6,     4292.330832950,  1.356098141 },
3724           {    0.001437e-6,       20.355319399,  3.895439360 },
3725           {    0.001738e-6,     6279.552731642,  0.087484036 },
3726           {    0.001367e-6,    14143.495242431,  3.987576591 },
3727           {    0.001344e-6,     7234.794256242,  0.090454338 },
3728           {    0.001438e-6,    11499.656222793,  0.974387904 },
3729           {    0.001257e-6,     6836.645252834,  1.509069366 },
3730           {    0.001358e-6,    11513.883316794,  0.495572260 },
3731           {    0.001628e-6,     7632.943259650,  4.968445721 },
3732           {    0.001169e-6,      103.092774219,  2.838496795 },
3733        /* 551, 560 */
3734           {    0.001162e-6,     4164.311989613,  3.408387778 },
3735           {    0.001092e-6,     6069.776754553,  3.617942651 },
3736           {    0.001008e-6,    17789.845619785,  0.286350174 },
3737           {    0.001008e-6,      639.897286314,  1.610762073 },
3738           {    0.000918e-6,    10213.285546211,  5.532798067 },
3739           {    0.001011e-6,    -6256.777530192,  0.661826484 },
3740           {    0.000753e-6,    16730.463689596,  3.905030235 },
3741           {    0.000737e-6,    11926.254413669,  4.641956361 },
3742           {    0.000694e-6,     3340.612426700,  2.111120332 },
3743           {    0.000701e-6,     3894.181829542,  2.760823491 },
3744        /* 561, 570 */
3745           {    0.000689e-6,     -135.065080035,  4.768800780 },
3746           {    0.000700e-6,    13367.972631107,  5.760439898 },
3747           {    0.000664e-6,     6040.347246017,  1.051215840 },
3748           {    0.000654e-6,     5650.292110678,  4.911332503 },
3749           {    0.000788e-6,     6681.224853400,  4.699648011 },
3750           {    0.000628e-6,     5333.900241022,  5.024608847 },
3751           {    0.000755e-6,     -110.206321219,  4.370971253 },
3752           {    0.000628e-6,     6290.189396992,  3.660478857 },
3753           {    0.000635e-6,    25132.303399966,  4.121051532 },
3754           {    0.000534e-6,     5966.683980335,  1.173284524 },
3755        /* 571, 580 */
3756           {    0.000543e-6,     -433.711737877,  0.345585464 },
3757           {    0.000517e-6,    -1990.745017041,  5.414571768 },
3758           {    0.000504e-6,     5767.611978898,  2.328281115 },
3759           {    0.000485e-6,     5753.384884897,  1.685874771 },
3760           {    0.000463e-6,     7860.419392439,  5.297703006 },
3761           {    0.000604e-6,      515.463871093,  0.591998446 },
3762           {    0.000443e-6,    12168.002696575,  4.830881244 },
3763           {    0.000570e-6,      199.072001436,  3.899190272 },
3764           {    0.000465e-6,    10969.965257698,  0.476681802 },
3765           {    0.000424e-6,    -7079.373856808,  1.112242763 },
3766        /* 581, 590 */
3767           {    0.000427e-6,      735.876513532,  1.994214480 },
3768           {    0.000478e-6,    -6127.655450557,  3.778025483 },
3769           {    0.000414e-6,    10973.555686350,  5.441088327 },
3770           {    0.000512e-6,     1589.072895284,  0.107123853 },
3771           {    0.000378e-6,    10984.192351700,  0.915087231 },
3772           {    0.000402e-6,    11371.704689758,  4.107281715 },
3773           {    0.000453e-6,     9917.696874510,  1.917490952 },
3774           {    0.000395e-6,      149.563197135,  2.763124165 },
3775           {    0.000371e-6,     5739.157790895,  3.112111866 },
3776           {    0.000350e-6,    11790.629088659,  0.440639857 },
3777        /* 591, 600 */
3778           {    0.000356e-6,     6133.512652857,  5.444568842 },
3779           {    0.000344e-6,      412.371096874,  5.676832684 },
3780           {    0.000383e-6,      955.599741609,  5.559734846 },
3781           {    0.000333e-6,     6496.374945429,  0.261537984 },
3782           {    0.000340e-6,     6055.549660552,  5.975534987 },
3783           {    0.000334e-6,     1066.495477190,  2.335063907 },
3784           {    0.000399e-6,    11506.769769794,  5.321230910 },
3785           {    0.000314e-6,    18319.536584880,  2.313312404 },
3786           {    0.000424e-6,     1052.268383188,  1.211961766 },
3787           {    0.000307e-6,       63.735898303,  3.169551388 },
3788        /* 601, 610 */
3789           {    0.000329e-6,       29.821438149,  6.106912080 },
3790           {    0.000357e-6,     6309.374169791,  4.223760346 },
3791           {    0.000312e-6,    -3738.761430108,  2.180556645 },
3792           {    0.000301e-6,      309.278322656,  1.499984572 },
3793           {    0.000268e-6,    12043.574281889,  2.447520648 },
3794           {    0.000257e-6,    12491.370101415,  3.662331761 },
3795           {    0.000290e-6,      625.670192312,  1.272834584 },
3796           {    0.000256e-6,     5429.879468239,  1.913426912 },
3797           {    0.000339e-6,     3496.032826134,  4.165930011 },
3798           {    0.000283e-6,     3930.209696220,  4.325565754 },
3799        /* 611, 620 */
3800           {    0.000241e-6,    12528.018664345,  3.832324536 },
3801           {    0.000304e-6,     4686.889407707,  1.612348468 },
3802           {    0.000259e-6,    16200.772724501,  3.470173146 },
3803           {    0.000238e-6,    12139.553509107,  1.147977842 },
3804           {    0.000236e-6,     6172.869528772,  3.776271728 },
3805           {    0.000296e-6,    -7058.598461315,  0.460368852 },
3806           {    0.000306e-6,    10575.406682942,  0.554749016 },
3807           {    0.000251e-6,    17298.182327326,  0.834332510 },
3808           {    0.000290e-6,     4732.030627343,  4.759564091 },
3809           {    0.000261e-6,     5884.926846583,  0.298259862 },
3810        /* 621, 630 */
3811           {    0.000249e-6,     5547.199336460,  3.749366406 },
3812           {    0.000213e-6,    11712.955318231,  5.415666119 },
3813           {    0.000223e-6,     4701.116501708,  2.703203558 },
3814           {    0.000268e-6,     -640.877607382,  0.283670793 },
3815           {    0.000209e-6,     5636.065016677,  1.238477199 },
3816           {    0.000193e-6,    10177.257679534,  1.943251340 },
3817           {    0.000182e-6,     6283.143160294,  2.456157599 },
3818           {    0.000184e-6,     -227.526189440,  5.888038582 },
3819           {    0.000182e-6,    -6283.008539689,  0.241332086 },
3820           {    0.000228e-6,    -6284.056171060,  2.657323816 },
3821        /* 631, 640 */
3822           {    0.000166e-6,     7238.675591600,  5.930629110 },
3823           {    0.000167e-6,     3097.883822726,  5.570955333 },
3824           {    0.000159e-6,     -323.505416657,  5.786670700 },
3825           {    0.000154e-6,    -4136.910433516,  1.517805532 },
3826           {    0.000176e-6,    12029.347187887,  3.139266834 },
3827           {    0.000167e-6,    12132.439962106,  3.556352289 },
3828           {    0.000153e-6,      202.253395174,  1.463313961 },
3829           {    0.000157e-6,    17267.268201691,  1.586837396 },
3830           {    0.000142e-6,    83996.847317911,  0.022670115 },
3831           {    0.000152e-6,    17260.154654690,  0.708528947 },
3832        /* 641, 650 */
3833           {    0.000144e-6,     6084.003848555,  5.187075177 },
3834           {    0.000135e-6,     5756.566278634,  1.993229262 },
3835           {    0.000134e-6,     5750.203491159,  3.457197134 },
3836           {    0.000144e-6,     5326.786694021,  6.066193291 },
3837           {    0.000160e-6,    11015.106477335,  1.710431974 },
3838           {    0.000133e-6,     3634.621024518,  2.836451652 },
3839           {    0.000134e-6,    18073.704938650,  5.453106665 },
3840           {    0.000134e-6,     1162.474704408,  5.326898811 },
3841           {    0.000128e-6,     5642.198242609,  2.511652591 },
3842           {    0.000160e-6,      632.783739313,  5.628785365 },
3843        /* 651, 660 */
3844           {    0.000132e-6,    13916.019109642,  0.819294053 },
3845           {    0.000122e-6,    14314.168113050,  5.677408071 },
3846           {    0.000125e-6,    12359.966151546,  5.251984735 },
3847           {    0.000121e-6,     5749.452731634,  2.210924603 },
3848           {    0.000136e-6,     -245.831646229,  1.646502367 },
3849           {    0.000120e-6,     5757.317038160,  3.240883049 },
3850           {    0.000134e-6,    12146.667056108,  3.059480037 },
3851           {    0.000137e-6,     6206.809778716,  1.867105418 },
3852           {    0.000141e-6,    17253.041107690,  2.069217456 },
3853           {    0.000129e-6,    -7477.522860216,  2.781469314 },
3854        /* 661, 670 */
3855           {    0.000116e-6,     5540.085789459,  4.281176991 },
3856           {    0.000116e-6,     9779.108676125,  3.320925381 },
3857           {    0.000129e-6,     5237.921013804,  3.497704076 },
3858           {    0.000113e-6,     5959.570433334,  0.983210840 },
3859           {    0.000122e-6,     6282.095528923,  2.674938860 },
3860           {    0.000140e-6,      -11.045700264,  4.957936982 },
3861           {    0.000108e-6,    23543.230504682,  1.390113589 },
3862           {    0.000106e-6,   -12569.674818332,  0.429631317 },
3863           {    0.000110e-6,     -266.607041722,  5.501340197 },
3864           {    0.000115e-6,    12559.038152982,  4.691456618 },
3865        /* 671, 680 */
3866           {    0.000134e-6,    -2388.894020449,  0.577313584 },
3867           {    0.000109e-6,    10440.274292604,  6.218148717 },
3868           {    0.000102e-6,     -543.918059096,  1.477842615 },
3869           {    0.000108e-6,    21228.392023546,  2.237753948 },
3870           {    0.000101e-6,    -4535.059436924,  3.100492232 },
3871           {    0.000103e-6,       76.266071276,  5.594294322 },
3872           {    0.000104e-6,      949.175608970,  5.674287810 },
3873           {    0.000101e-6,    13517.870106233,  2.196632348 },
3874           {    0.000100e-6,    11933.367960670,  4.056084160 },
3875 
3876        /* T^2 */
3877           {    4.322990e-6,     6283.075849991,  2.642893748 },
3878        /* 681, 690 */
3879           {    0.406495e-6,        0.000000000,  4.712388980 },
3880           {    0.122605e-6,    12566.151699983,  2.438140634 },
3881           {    0.019476e-6,      213.299095438,  1.642186981 },
3882           {    0.016916e-6,      529.690965095,  4.510959344 },
3883           {    0.013374e-6,       -3.523118349,  1.502210314 },
3884           {    0.008042e-6,       26.298319800,  0.478549024 },
3885           {    0.007824e-6,      155.420399434,  5.254710405 },
3886           {    0.004894e-6,     5746.271337896,  4.683210850 },
3887           {    0.004875e-6,     5760.498431898,  0.759507698 },
3888           {    0.004416e-6,     5223.693919802,  6.028853166 },
3889        /* 691, 700 */
3890           {    0.004088e-6,       -7.113547001,  0.060926389 },
3891           {    0.004433e-6,    77713.771467920,  3.627734103 },
3892           {    0.003277e-6,    18849.227549974,  2.327912542 },
3893           {    0.002703e-6,     6062.663207553,  1.271941729 },
3894           {    0.003435e-6,     -775.522611324,  0.747446224 },
3895           {    0.002618e-6,     6076.890301554,  3.633715689 },
3896           {    0.003146e-6,      206.185548437,  5.647874613 },
3897           {    0.002544e-6,     1577.343542448,  6.232904270 },
3898           {    0.002218e-6,     -220.412642439,  1.309509946 },
3899           {    0.002197e-6,     5856.477659115,  2.407212349 },
3900        /* 701, 710 */
3901           {    0.002897e-6,     5753.384884897,  5.863842246 },
3902           {    0.001766e-6,      426.598190876,  0.754113147 },
3903           {    0.001738e-6,     -796.298006816,  2.714942671 },
3904           {    0.001695e-6,      522.577418094,  2.629369842 },
3905           {    0.001584e-6,     5507.553238667,  1.341138229 },
3906           {    0.001503e-6,     -242.728603974,  0.377699736 },
3907           {    0.001552e-6,     -536.804512095,  2.904684667 },
3908           {    0.001370e-6,     -398.149003408,  1.265599125 },
3909           {    0.001889e-6,    -5573.142801634,  4.413514859 },
3910           {    0.001722e-6,     6069.776754553,  2.445966339 },
3911        /* 711, 720 */
3912           {    0.001124e-6,     1059.381930189,  5.041799657 },
3913           {    0.001258e-6,      553.569402842,  3.849557278 },
3914           {    0.000831e-6,      951.718406251,  2.471094709 },
3915           {    0.000767e-6,     4694.002954708,  5.363125422 },
3916           {    0.000756e-6,     1349.867409659,  1.046195744 },
3917           {    0.000775e-6,      -11.045700264,  0.245548001 },
3918           {    0.000597e-6,     2146.165416475,  4.543268798 },
3919           {    0.000568e-6,     5216.580372801,  4.178853144 },
3920           {    0.000711e-6,     1748.016413067,  5.934271972 },
3921           {    0.000499e-6,    12036.460734888,  0.624434410 },
3922        /* 721, 730 */
3923           {    0.000671e-6,    -1194.447010225,  4.136047594 },
3924           {    0.000488e-6,     5849.364112115,  2.209679987 },
3925           {    0.000621e-6,     6438.496249426,  4.518860804 },
3926           {    0.000495e-6,    -6286.598968340,  1.868201275 },
3927           {    0.000456e-6,     5230.807466803,  1.271231591 },
3928           {    0.000451e-6,     5088.628839767,  0.084060889 },
3929           {    0.000435e-6,     5643.178563677,  3.324456609 },
3930           {    0.000387e-6,    10977.078804699,  4.052488477 },
3931           {    0.000547e-6,   161000.685737473,  2.841633844 },
3932           {    0.000522e-6,     3154.687084896,  2.171979966 },
3933        /* 731, 740 */
3934           {    0.000375e-6,     5486.777843175,  4.983027306 },
3935           {    0.000421e-6,     5863.591206116,  4.546432249 },
3936           {    0.000439e-6,     7084.896781115,  0.522967921 },
3937           {    0.000309e-6,     2544.314419883,  3.172606705 },
3938           {    0.000347e-6,     4690.479836359,  1.479586566 },
3939           {    0.000317e-6,      801.820931124,  3.553088096 },
3940           {    0.000262e-6,      419.484643875,  0.606635550 },
3941           {    0.000248e-6,     6836.645252834,  3.014082064 },
3942           {    0.000245e-6,    -1592.596013633,  5.519526220 },
3943           {    0.000225e-6,     4292.330832950,  2.877956536 },
3944        /* 741, 750 */
3945           {    0.000214e-6,     7234.794256242,  1.605227587 },
3946           {    0.000205e-6,     5767.611978898,  0.625804796 },
3947           {    0.000180e-6,    10447.387839604,  3.499954526 },
3948           {    0.000229e-6,      199.072001436,  5.632304604 },
3949           {    0.000214e-6,      639.897286314,  5.960227667 },
3950           {    0.000175e-6,     -433.711737877,  2.162417992 },
3951           {    0.000209e-6,      515.463871093,  2.322150893 },
3952           {    0.000173e-6,     6040.347246017,  2.556183691 },
3953           {    0.000184e-6,     6309.374169791,  4.732296790 },
3954           {    0.000227e-6,   149854.400134205,  5.385812217 },
3955        /* 751, 760 */
3956           {    0.000154e-6,     8031.092263058,  5.120720920 },
3957           {    0.000151e-6,     5739.157790895,  4.815000443 },
3958           {    0.000197e-6,     7632.943259650,  0.222827271 },
3959           {    0.000197e-6,       74.781598567,  3.910456770 },
3960           {    0.000138e-6,     6055.549660552,  1.397484253 },
3961           {    0.000149e-6,    -6127.655450557,  5.333727496 },
3962           {    0.000137e-6,     3894.181829542,  4.281749907 },
3963           {    0.000135e-6,     9437.762934887,  5.979971885 },
3964           {    0.000139e-6,    -2352.866153772,  4.715630782 },
3965           {    0.000142e-6,     6812.766815086,  0.513330157 },
3966        /* 761, 770 */
3967           {    0.000120e-6,    -4705.732307544,  0.194160689 },
3968           {    0.000131e-6,   -71430.695617928,  0.000379226 },
3969           {    0.000124e-6,     6279.552731642,  2.122264908 },
3970           {    0.000108e-6,    -6256.777530192,  0.883445696 },
3971 
3972        /* T^3 */
3973           {    0.143388e-6,     6283.075849991,  1.131453581 },
3974           {    0.006671e-6,    12566.151699983,  0.775148887 },
3975           {    0.001480e-6,      155.420399434,  0.480016880 },
3976           {    0.000934e-6,      213.299095438,  6.144453084 },
3977           {    0.000795e-6,      529.690965095,  2.941595619 },
3978           {    0.000673e-6,     5746.271337896,  0.120415406 },
3979        /* 771, 780 */
3980           {    0.000672e-6,     5760.498431898,  5.317009738 },
3981           {    0.000389e-6,     -220.412642439,  3.090323467 },
3982           {    0.000373e-6,     6062.663207553,  3.003551964 },
3983           {    0.000360e-6,     6076.890301554,  1.918913041 },
3984           {    0.000316e-6,      -21.340641002,  5.545798121 },
3985           {    0.000315e-6,     -242.728603974,  1.884932563 },
3986           {    0.000278e-6,      206.185548437,  1.266254859 },
3987           {    0.000238e-6,     -536.804512095,  4.532664830 },
3988           {    0.000185e-6,      522.577418094,  4.578313856 },
3989           {    0.000245e-6,    18849.227549974,  0.587467082 },
3990        /* 781, 787 */
3991           {    0.000180e-6,      426.598190876,  5.151178553 },
3992           {    0.000200e-6,      553.569402842,  5.355983739 },
3993           {    0.000141e-6,     5223.693919802,  1.336556009 },
3994           {    0.000104e-6,     5856.477659115,  4.239842759 },
3995 
3996        /* T^4 */
3997           {    0.003826e-6,     6283.075849991,  5.705257275 },
3998           {    0.000303e-6,    12566.151699983,  5.407132842 },
3999           {    0.000209e-6,      155.420399434,  1.989815753 }
4000        };
4001 
4002 
4003     /* Time since J2000.0 in Julian millennia. */
4004        t = ((date1 - DJ00) + date2) / DJM;
4005 
4006     /* ================= */
4007     /* Topocentric terms */
4008     /* ================= */
4009 
4010     /* Convert UT to local solar time in radians. */
4011        tsol = fmod(ut, 1.0) * D2PI + elong;
4012 
4013     /* FUNDAMENTAL ARGUMENTS:  Simon et al. 1994. */
4014 
4015     /* Combine time argument (millennia) with deg/arcsec factor. */
4016        w = t / 3600.0;
4017 
4018     /* Sun Mean Longitude. */
4019        elsun = fmod(280.46645683 + 1296027711.03429 * w, 360.0) * DD2R;
4020 
4021     /* Sun Mean Anomaly. */
4022        emsun = fmod(357.52910918 + 1295965810.481 * w, 360.0) * DD2R;
4023 
4024     /* Mean Elongation of Moon from Sun. */
4025        d = fmod(297.85019547 + 16029616012.090 * w, 360.0) * DD2R;
4026 
4027     /* Mean Longitude of Jupiter. */
4028        elj = fmod(34.35151874 + 109306899.89453 * w, 360.0) * DD2R;
4029 
4030     /* Mean Longitude of Saturn. */
4031        els = fmod(50.07744430 + 44046398.47038 * w, 360.0) * DD2R;
4032 
4033     /* TOPOCENTRIC TERMS:  Moyer 1981 and Murray 1983. */
4034        wt =   +  0.00029e-10 * u * sin(tsol + elsun - els)
4035               +  0.00100e-10 * u * sin(tsol - 2.0 * emsun)
4036               +  0.00133e-10 * u * sin(tsol - d)
4037               +  0.00133e-10 * u * sin(tsol + elsun - elj)
4038               -  0.00229e-10 * u * sin(tsol + 2.0 * elsun + emsun)
4039               -  0.02200e-10 * v * cos(elsun + emsun)
4040               +  0.05312e-10 * u * sin(tsol - emsun)
4041               -  0.13677e-10 * u * sin(tsol + 2.0 * elsun)
4042               -  1.31840e-10 * v * cos(elsun)
4043               +  3.17679e-10 * u * sin(tsol);
4044 
4045     /* ===================== */
4046     /* Fairhead et al. model */
4047     /* ===================== */
4048 
4049     /* T**0 */
4050        w0 = 0;
4051        for (j = 473; j >= 0; j--) {
4052           w0 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4053        }
4054 
4055     /* T**1 */
4056        w1 = 0;
4057        for (j = 678; j >= 474; j--) {
4058           w1 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4059        }
4060 
4061     /* T**2 */
4062        w2 = 0;
4063        for (j = 763; j >= 679; j--) {
4064           w2 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4065        }
4066 
4067     /* T**3 */
4068        w3 = 0;
4069        for (j = 783; j >= 764; j--) {
4070           w3 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4071        }
4072 
4073     /* T**4 */
4074        w4 = 0;
4075        for (j = 786; j >= 784; j--) {
4076           w4 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4077        }
4078 
4079     /* Multiply by powers of T and combine. */
4080        wf = t * (t * (t * (t * w4 + w3) + w2) + w1) + w0;
4081 
4082     /* Adjustments to use JPL planetary masses instead of IAU. */
4083        wj =   0.00065e-6 * sin(6069.776754 * t + 4.021194) +
4084               0.00033e-6 * sin( 213.299095 * t + 5.543132) +
4085             (-0.00196e-6 * sin(6208.294251 * t + 5.696701)) +
4086             (-0.00173e-6 * sin(  74.781599 * t + 2.435900)) +
4087               0.03638e-6 * t * t;
4088 
4089     /* ============ */
4090     /* Final result */
4091     /* ============ */
4092 
4093     /* TDB-TT in seconds. */
4094        w = wt + wf + wj;
4095 
4096        return w;
4097 
4098         }
4099     
4100 
4101     /**
4102     *  The equation of the equinoxes, compatible with IAU 2000 resolutions,
4103     *  given the nutation in longitude and the mean obliquity.
4104     *
4105     *<p>This function is derived from the International Astronomical Union's
4106     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4107     *
4108     *<p>Status:  canonical model.
4109     *
4110     *<!-- Given: -->
4111     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4112     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4113     *     @param epsa          double     mean obliquity (Note 2)
4114     *     @param dpsi          double     nutation in longitude (Note 3)
4115     *
4116     * <!-- Returned (function value): -->
4117     *  @return double    equation of the equinoxes (Note 4)
4118     *
4119     * <p>Notes:
4120     * <ol>
4121     *
4122     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4123     *     convenient way between the two arguments.  For example,
4124     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4125     *     among others:
4126     *<pre>
4127     *            date1          date2
4128     *
4129     *         2450123.7           0.0       (JD method)
4130     *         2451545.0       -1421.3       (J2000 method)
4131     *         2400000.5       50123.2       (MJD method)
4132     *         2450123.5           0.2       (date &amp; time method)
4133     *</pre>
4134     *     The JD method is the most natural and convenient to use in
4135     *     cases where the loss of several decimal digits of resolution
4136     *     is acceptable.  The J2000 method is best matched to the way
4137     *     the argument is handled internally and will deliver the
4138     *     optimum resolution.  The MJD method and the date &amp; time methods
4139     *     are both good compromises between resolution and convenience.
4140     *
4141     * <li> The obliquity, in radians, is mean of date.
4142     *
4143     * <li> The result, which is in radians, operates in the following sense:
4144     *
4145     *        Greenwich apparent ST = GMST + equation of the equinoxes
4146     *
4147     * <li> The result is compatible with the IAU 2000 resolutions.  For
4148     *     further details, see IERS Conventions 2003 and Capitaine et al.
4149     *     (2002).
4150     *</ol>
4151     *<p>Called:<ul>
4152     *     <li>{@link #jauEect00} equation of the equinoxes complementary terms
4153     * </ul>
4154     *<p>
4155     *
4156     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4157     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4158     *     Astrophysics, 406, 1135-1149 (2003)
4159     *
4160     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4161     *     IERS Technical Note No. 32, BKG (2004)
4162     *
4163     *@version 2008 May 16
4164     *
4165     *  @since Release 20101201
4166     *
4167     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4168     */
4169     public static double jauEe00(double date1, double date2, double epsa, double dpsi)
4170     {
4171        double ee;
4172 
4173 
4174     /* Equation of the equinoxes. */
4175        ee = dpsi * cos(epsa) + jauEect00(date1, date2);
4176 
4177        return ee;
4178 
4179         }
4180     
4181 
4182     /**
4183     *  Equation of the equinoxes, compatible with IAU 2000 resolutions.
4184     *
4185     *<p>This function is derived from the International Astronomical Union's
4186     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4187     *
4188     *<p>Status:  support function.
4189     *
4190     *<!-- Given: -->
4191     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4192     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4193     *
4194     * <!-- Returned (function value): -->
4195     *  @return double    equation of the equinoxes (Note 2)
4196     *
4197     * <p>Notes:
4198     * <ol>
4199     *
4200     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4201     *     convenient way between the two arguments.  For example,
4202     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4203     *     among others:
4204     *<pre>
4205     *            date1          date2
4206     *
4207     *         2450123.7           0.0       (JD method)
4208     *         2451545.0       -1421.3       (J2000 method)
4209     *         2400000.5       50123.2       (MJD method)
4210     *         2450123.5           0.2       (date &amp; time method)
4211     *</pre>
4212     *     The JD method is the most natural and convenient to use in
4213     *     cases where the loss of several decimal digits of resolution
4214     *     is acceptable.  The J2000 method is best matched to the way
4215     *     the argument is handled internally and will deliver the
4216     *     optimum resolution.  The MJD method and the date &amp; time methods
4217     *     are both good compromises between resolution and convenience.
4218     *
4219     * <li> The result, which is in radians, operates in the following sense:
4220     *
4221     *        Greenwich apparent ST = GMST + equation of the equinoxes
4222     *
4223     * <li> The result is compatible with the IAU 2000 resolutions.  For
4224     *     further details, see IERS Conventions 2003 and Capitaine et al.
4225     *     (2002).
4226     *</ol>
4227     *<p>Called:<ul>
4228     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
4229     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
4230     *     <li>{@link #jauNut00a} nutation, IAU 2000A
4231     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4232     * </ul>
4233     *<p>References:
4234     *
4235     *     <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4236     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4237     *     Astrophysics, 406, 1135-1149 (2003).
4238     *
4239     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4240     *     IERS Technical Note No. 32, BKG (2004).
4241     *
4242     *@version 2008 May 16
4243     *
4244     *  @since Release 20101201
4245     *
4246     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4247     */
4248     public static double jauEe00a(double date1, double date2)
4249     {
4250        double epsa,  ee;
4251 
4252 
4253     /* IAU 2000 precession-rate adjustments. */
4254        PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4255 
4256     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4257        epsa = jauObl80(date1, date2) + nutd.depspr;
4258 
4259     /* Nutation in longitude. */
4260        NutationTerms nut = jauNut00a(date1, date2);
4261 
4262     /* Equation of the equinoxes. */
4263        ee = jauEe00(date1, date2, epsa, nut.dpsi);
4264 
4265        return ee;
4266 
4267         }
4268     
4269 
4270     /**
4271     *  Equation of the equinoxes, compatible with IAU 2000 resolutions but
4272     *  using the truncated nutation model IAU 2000B.
4273     *
4274     *<p>This function is derived from the International Astronomical Union's
4275     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4276     *
4277     *<p>Status:  support function.
4278     *
4279     *<!-- Given: -->
4280     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4281     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4282     *
4283     * <!-- Returned (function value): -->
4284     *  @return double    equation of the equinoxes (Note 2)
4285     *
4286     * <p>Notes:
4287     * <ol>
4288     *
4289     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4290     *     convenient way between the two arguments.  For example,
4291     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4292     *     among others:
4293     *<pre>
4294     *            date1          date2
4295     *
4296     *         2450123.7           0.0       (JD method)
4297     *         2451545.0       -1421.3       (J2000 method)
4298     *         2400000.5       50123.2       (MJD method)
4299     *         2450123.5           0.2       (date &amp; time method)
4300     *</pre>
4301     *     The JD method is the most natural and convenient to use in
4302     *     cases where the loss of several decimal digits of resolution
4303     *     is acceptable.  The J2000 method is best matched to the way
4304     *     the argument is handled internally and will deliver the
4305     *     optimum resolution.  The MJD method and the date &amp; time methods
4306     *     are both good compromises between resolution and convenience.
4307     *
4308     * <li> The result, which is in radians, operates in the following sense:
4309     *
4310     *        Greenwich apparent ST = GMST + equation of the equinoxes
4311     *
4312     * <li> The result is compatible with the IAU 2000 resolutions except
4313     *     that accuracy has been compromised for the sake of speed.  For
4314     *     further details, see McCarthy &amp; Luzum (2001), IERS Conventions
4315     *     2003 and Capitaine et al. (2003).
4316     *</ol>
4317     *<p>Called:<ul>
4318     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
4319     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
4320     *     <li>{@link #jauNut00b} nutation, IAU 2000B
4321     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4322     * </ul>
4323     *<p>
4324     *
4325     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4326     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4327     *     Astrophysics, 406, 1135-1149 (2003)
4328     *
4329     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
4330     *     precession-nutation of the celestial pole", Celestial Mechanics &amp;
4331     *     Dynamical Astronomy, 85, 37-49 (2003)
4332     *
4333     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4334     *     IERS Technical Note No. 32, BKG (2004)
4335     *
4336     *@version 2008 May 18
4337     *
4338     *  @since Release 20101201
4339     *
4340     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4341     */
4342     public static  double jauEe00b(double date1, double date2)
4343     {
4344        double  ee;
4345 
4346 
4347     /* IAU 2000 precession-rate adjustments. */
4348        PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4349 
4350     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4351        double epsa = jauObl80(date1, date2) + nutd.depspr;
4352 
4353     /* Nutation in longitude. dpsi, deps*/
4354        NutationTerms nut = jauNut00b(date1, date2 );
4355 
4356     /* Equation of the equinoxes. */
4357        ee = jauEe00(date1, date2, epsa, nut.dpsi);
4358 
4359        return ee;
4360 
4361         }
4362  
4363     /**
4364     *  Equation of the equinoxes, compatible with IAU 2000 resolutions and
4365     *  IAU 2006/2000A precession-nutation.
4366     *
4367     *<p>This function is derived from the International Astronomical Union's
4368     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4369     *
4370     *<p>Status:  support function.
4371     *
4372     *<!-- Given: -->
4373     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4374     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4375     *
4376     * <!-- Returned (function value): -->
4377     *  @return double    equation of the equinoxes (Note 2)
4378     *
4379     * <p>Notes:
4380     * <ol>
4381     *
4382     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4383     *     convenient way between the two arguments.  For example,
4384     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4385     *     among others:
4386     *<pre>
4387     *            date1          date2
4388     *
4389     *         2450123.7           0.0       (JD method)
4390     *         2451545.0       -1421.3       (J2000 method)
4391     *         2400000.5       50123.2       (MJD method)
4392     *         2450123.5           0.2       (date &amp; time method)
4393     *</pre>
4394     *     The JD method is the most natural and convenient to use in
4395     *     cases where the loss of several decimal digits of resolution
4396     *     is acceptable.  The J2000 method is best matched to the way
4397     *     the argument is handled internally and will deliver the
4398     *     optimum resolution.  The MJD method and the date &amp; time methods
4399     *     are both good compromises between resolution and convenience.
4400     *
4401     * <li> The result, which is in radians, operates in the following sense:
4402     *
4403     *        Greenwich apparent ST = GMST + equation of the equinoxes
4404     *</ol>
4405     *<p>Called:<ul>
4406     *     <li>{@link #jauAnpm} normalize angle into range +/- pi
4407     *     <li>{@link #jauGst06a} Greenwich apparent sidereal time, IAU 2006/2000A
4408     *     <li>{@link #jauGmst06} Greenwich mean sidereal time, IAU 2006
4409     * </ul>
4410     *<p>Reference:
4411     *
4412     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
4413     *     IERS Technical Note No. 32, BKG
4414     *
4415     *@version 2008 May 18
4416     *
4417     *  @since Release 20101201
4418     *
4419     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4420     */
4421     public static double jauEe06a(double date1, double date2)
4422     {
4423        double gst06a, gmst06, ee;
4424 
4425 
4426     /* Apparent and mean sidereal times. */
4427        gst06a = jauGst06a(0.0, 0.0, date1, date2);
4428        gmst06 = jauGmst06(0.0, 0.0, date1, date2);
4429 
4430     /* Equation of the equinoxes. */
4431        ee  = jauAnpm(gst06a - gmst06);
4432 
4433        return ee;
4434 
4435         }
4436  
4437     private static class TERM {
4438         final int nfa[];      /* coefficients of l,l',F,D,Om,LVe,LE,pA */
4439         final double s, c;     /* sine and cosine coefficients */
4440         public TERM(int nfa[], double s, double c) {
4441             this.nfa = nfa;
4442             this.s = s;
4443             this.c = c;
4444         }
4445        
4446      } 
4447 
4448 
4449     /**
4450     *  Equation of the equinoxes complementary terms, consistent with
4451     *  IAU 2000 resolutions.
4452     *
4453     *<p>This function is derived from the International Astronomical Union's
4454     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4455     *
4456     *<p>Status:  canonical model.
4457     *
4458     *<!-- Given: -->
4459     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4460     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4461     *
4462     * <!-- Returned (function value): -->
4463     *  @return double   complementary terms (Note 2)
4464     *
4465     * <p>Notes:
4466     * <ol>
4467     *
4468     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4469     *     convenient way between the two arguments.  For example,
4470     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4471     *     among others:
4472     *<pre>
4473     *            date1          date2
4474     *
4475     *         2450123.7           0.0       (JD method)
4476     *         2451545.0       -1421.3       (J2000 method)
4477     *         2400000.5       50123.2       (MJD method)
4478     *         2450123.5           0.2       (date &amp; time method)
4479     *</pre>
4480     *     The JD method is the most natural and convenient to use in
4481     *     cases where the loss of several decimal digits of resolution
4482     *     is acceptable.  The J2000 method is best matched to the way
4483     *     the argument is handled internally and will deliver the
4484     *     optimum resolution.  The MJD method and the date &amp; time methods
4485     *     are both good compromises between resolution and convenience.
4486     *
4487     * <li> The "complementary terms" are part of the equation of the
4488     *     equinoxes (EE), classically the difference between apparent and
4489     *     mean Sidereal Time:
4490     *
4491     *        GAST = GMST + EE
4492     *
4493     *     with:
4494     *
4495     *        EE = dpsi * cos(eps)
4496     *
4497     *     where dpsi is the nutation in longitude and eps is the obliquity
4498     *     of date.  However, if the rotation of the Earth were constant in
4499     *     an inertial frame the classical formulation would lead to
4500     *     apparent irregularities in the UT1 timescale traceable to side-
4501     *     effects of precession-nutation.  In order to eliminate these
4502     *     effects from UT1, "complementary terms" were introduced in 1994
4503     *     (IAU, 1994) and took effect from 1997 (Capitaine and Gontier,
4504     * <li>:
4505     *
4506     *        GAST = GMST + CT + EE
4507     *
4508     *     By convention, the complementary terms are included as part of
4509     *     the equation of the equinoxes rather than as part of the mean
4510     *     Sidereal Time.  This slightly compromises the "geometrical"
4511     *     interpretation of mean sidereal time but is otherwise
4512     *     inconsequential.
4513     *
4514     *     The present function computes CT in the above expression,
4515     *     compatible with IAU 2000 resolutions (Capitaine et al., 2002, and
4516     *     IERS Conventions 2003).
4517     *</ol>
4518     *<p>Called:<ul>
4519     *     <li>{@link #jauFal03} mean anomaly of the Moon
4520     *     <li>{@link #jauFalp03} mean anomaly of the Sun
4521     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
4522     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
4523     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
4524     *     <li>{@link #jauFave03} mean longitude of Venus
4525     *     <li>{@link #jauFae03} mean longitude of Earth
4526     *     <li>{@link #jauFapa03} general accumulated precession in longitude
4527     * </ul>
4528     *<p>References:
4529     *
4530     *     <p>Capitaine, N. &amp; Gontier, A.-M., Astron. Astrophys., 275,
4531     *     645-650 (1993)
4532     *
4533     *     <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4534     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4535     *     Astrophysics, 406, 1135-1149 (2003)
4536     *
4537     *     <p>IAU Resolution C7, Recommendation 3 (1994)
4538     *
4539     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4540     *     IERS Technical Note No. 32, BKG (2004)
4541     *
4542     *@version 2009 December 17
4543     *
4544     *  @since Release 20101201
4545     *
4546     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4547     */
4548     public static double jauEect00(double date1, double date2)
4549     {
4550     /* Time since J2000.0, in Julian centuries */
4551        double t;
4552 
4553     /* Miscellaneous */
4554        int i, j;
4555        double a, s0, s1;
4556 
4557     /* Fundamental arguments */
4558        double fa[] = new double[14];
4559 
4560     /* Returned value. */
4561        double eect;
4562 
4563     /* ----------------------------------------- */
4564     /* The series for the EE complementary terms */
4565     /* ----------------------------------------- */
4566 
4567 
4568     /* Terms of order t^0 */
4569        final TERM e0[] = {
4570 
4571        /* 1-10 */
4572           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, 2640.96e-6, -0.39e-6 ),
4573           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   63.52e-6, -0.02e-6 ),
4574           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   11.75e-6,  0.01e-6 ),
4575           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   11.21e-6,  0.01e-6 ),
4576           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},   -4.55e-6,  0.00e-6 ),
4577           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    2.02e-6,  0.00e-6 ),
4578           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    1.98e-6,  0.00e-6 ),
4579           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},   -1.72e-6,  0.00e-6 ),
4580           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},   -1.41e-6, -0.01e-6 ),
4581           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},   -1.26e-6, -0.01e-6 ),
4582 
4583        /* 11-20 */
4584           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},   -0.63e-6,  0.00e-6 ),
4585           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},   -0.63e-6,  0.00e-6 ),
4586           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    0.46e-6,  0.00e-6 ),
4587           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    0.45e-6,  0.00e-6 ),
4588           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    0.36e-6,  0.00e-6 ),
4589           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},   -0.24e-6, -0.12e-6 ),
4590           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    0.32e-6,  0.00e-6 ),
4591           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    0.28e-6,  0.00e-6 ),
4592           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    0.27e-6,  0.00e-6 ),
4593           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    0.26e-6,  0.00e-6 ),
4594 
4595        /* 21-30 */
4596           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},   -0.21e-6,  0.00e-6 ),
4597           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    0.19e-6,  0.00e-6 ),
4598           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    0.18e-6,  0.00e-6 ),
4599           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},   -0.10e-6,  0.05e-6 ),
4600           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    0.15e-6,  0.00e-6 ),
4601           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},   -0.14e-6,  0.00e-6 ),
4602           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    0.14e-6,  0.00e-6 ),
4603           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},   -0.14e-6,  0.00e-6 ),
4604           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    0.14e-6,  0.00e-6 ),
4605           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    0.13e-6,  0.00e-6 ),
4606 
4607        /* 31-33 */
4608           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},   -0.11e-6,  0.00e-6 ),
4609           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    0.11e-6,  0.00e-6 ),
4610           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    0.11e-6,  0.00e-6 )
4611        };
4612 
4613     /* Terms of order t^1 */
4614        final TERM e1[] = {
4615           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.87e-6,  0.00e-6 )
4616        };
4617 
4618     /* Number of terms in the series */
4619        final int NE0 = e0.length;
4620        final int NE1 = e1.length;
4621 
4622     /*--------------------------------------------------------------------*/
4623 
4624     /* Interval between fundamental epoch J2000.0 and current date (JC). */
4625        t = ((date1 - DJ00) + date2) / DJC;
4626 
4627     /* Fundamental Arguments (from IERS Conventions 2003) */
4628 
4629     /* Mean anomaly of the Moon. */
4630        fa[0] = jauFal03(t);
4631 
4632     /* Mean anomaly of the Sun. */
4633        fa[1] = jauFalp03(t);
4634 
4635     /* Mean longitude of the Moon minus that of the ascending node. */
4636        fa[2] = jauFaf03(t);
4637 
4638     /* Mean elongation of the Moon from the Sun. */
4639        fa[3] = jauFad03(t);
4640 
4641     /* Mean longitude of the ascending node of the Moon. */
4642        fa[4] = jauFaom03(t);
4643 
4644     /* Mean longitude of Venus. */
4645        fa[5] = jauFave03(t);
4646 
4647     /* Mean longitude of Earth. */
4648        fa[6] = jauFae03(t);
4649 
4650     /* General precession in longitude. */
4651        fa[7] = jauFapa03(t);
4652 
4653     /* Evaluate the EE complementary terms. */
4654        s0 = 0.0;
4655        s1 = 0.0;
4656 
4657        for (i = NE0-1; i >= 0; i--) {
4658           a = 0.0;
4659           for (j = 0; j < 8; j++) {
4660              a += (double)(e0[i].nfa[j]) * fa[j];
4661           }
4662           s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
4663        }
4664 
4665        for (i = NE1-1; i >= 0; i--) {
4666           a = 0.0;
4667           for (j = 0; j < 8; j++) {
4668              a += (double)(e1[i].nfa[j]) * fa[j];
4669           }
4670           s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
4671        }
4672 
4673        eect = (s0 + s1 * t ) * DAS2R;
4674 
4675        return eect;
4676 
4677         }
4678     
4679     /**
4680      * Reference Ellipsoid of Earth.
4681      * 
4682      * The ellipsoid parameters are returned in the form of equatorial
4683     *     radius in meters (a) and flattening (f).  The latter is a number
4684     *     around 0.00335, i.e. around 1/298.
4685     *
4686      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
4687      * 
4688      * @since AIDA Stage 1
4689      */
4690     public static class ReferenceEllipsoid{
4691         /** equatorial radius (meters, Note 2) */
4692         public double a; 
4693         /** flattening (Note 2) */
4694         public double f ;
4695         public ReferenceEllipsoid(double a, double f ) {
4696             this.a = a;
4697             this.f = f;
4698         }
4699     }
4700     /**
4701     *  Earth reference ellipsoids.
4702     *
4703     *<p>This function is derived from the International Astronomical Union's
4704     *  JSOFA (Standards of Fundamental Astronomy) software collection.
4705     *
4706     *<p>Status:  canonical.
4707     *
4708     *<!-- Given: -->
4709     *     @param n        int       ellipsoid identifier (Note 1)
4710     *
4711     *<!-- Returned: -->
4712     *     @return  a        double     <u>returned</u> equatorial radius (meters, Note 2)
4713     *              f        double     <u>returned</u> flattening (Note 2)
4714     *
4715     * <!-- Returned (function value): -->
4716     *  @throws JSOFAIllegalParameter
4717     *                     int       status:
4718     *                          0 = OK
4719     *                         -1 = illegal identifier (Note 3)
4720     *
4721     * <p>Notes:
4722     * <ol>
4723     *
4724     * <li> The identifier n is a number that specifies the choice of
4725     *     reference ellipsoid.  The following are supported:
4726     *
4727     *        n   ellipsoid
4728     *
4729     *        1    WGS84
4730     *        2    GRS80
4731     *        3    WGS72
4732     *
4733     *     The number n has no significance outside the JSOFA software.
4734     *
4735     * <li> The ellipsoid parameters are returned in the form of equatorial
4736     *     radius in meters (a) and flattening (f).  The latter is a number
4737     *     around 0.00335, i.e. around 1/298.
4738     *
4739     * <li> For the case where an unsupported n value is supplied, zero a and
4740     *     f are returned, as well as error status.
4741     *</ol>
4742     *<p>References:
4743     *
4744     *     <p>Department of Defense World Geodetic System 1984, National
4745     *     Imagery and Mapping Agency Technical Report 8350.2, Third
4746     *     Edition, p3-2.
4747     *
4748     *     <p>Moritz, H., Bull. Geodesique 66-2, 187 (1992).
4749     *
4750     *     <p>The Department of Defense World Geodetic System 1972, World
4751     *     Geodetic System Committee, May 1974.
4752     *
4753     *     <p>Explanatory Supplement to the Astronomical Almanac,
4754     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
4755     *     p220.
4756     *
4757     *@version 2010 January 18
4758     *
4759     *  @since Release 20101201
4760     *
4761     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4762     */
4763     public static  ReferenceEllipsoid jauEform ( int n ) throws JSOFAIllegalParameter
4764     {
4765       double a,f;
4766     /* Look up a and f for the specified reference ellipsoid. */
4767        switch ( n ) {
4768        case 1:
4769 
4770        /* WGS84. */
4771           a = 6378137.0;
4772           f = 1.0 / 298.257223563;
4773           break;
4774 
4775        case 2:
4776 
4777        /* GRS80. */
4778           a = 6378137.0;
4779           f = 1.0 / 298.257222101;
4780           break;
4781 
4782        case 3:
4783 
4784        /* WGS72. */
4785           a = 6378135.0;
4786           f = 1.0 / 298.26;
4787           break;
4788 
4789        default:
4790 
4791        /* Invalid identifier. */
4792           a = 0.0;
4793           f = 0.0;
4794           throw new JSOFAIllegalParameter("illegal ellipsoid identifier", -1);
4795 
4796        }
4797 
4798     /* OK status. */
4799        return new ReferenceEllipsoid(a, f);
4800 
4801     
4802     }
4803     
4804 
4805     /**
4806     *  Equation of the origins, IAU 2006 precession and IAU 2000A nutation.
4807     *
4808     *<p>This function is derived from the International Astronomical Union's
4809     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4810     *
4811     *<p>Status:  support function.
4812     *
4813     *<!-- Given: -->
4814     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4815     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4816     *
4817     * <!-- Returned (function value): -->
4818     *  @return double    equation of the origins in radians
4819     *
4820     * <p>Notes:
4821     * <ol>
4822     *
4823     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4824     *     convenient way between the two arguments.  For example,
4825     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4826     *     among others:
4827     *<pre>
4828     *            date1          date2
4829     *
4830     *         2450123.7           0.0       (JD method)
4831     *         2451545.0       -1421.3       (J2000 method)
4832     *         2400000.5       50123.2       (MJD method)
4833     *         2450123.5           0.2       (date &amp; time method)
4834     *</pre>
4835     *     The JD method is the most natural and convenient to use in
4836     *     cases where the loss of several decimal digits of resolution
4837     *     is acceptable.  The J2000 method is best matched to the way
4838     *     the argument is handled internally and will deliver the
4839     *     optimum resolution.  The MJD method and the date &amp; time methods
4840     *     are both good compromises between resolution and convenience.
4841     *
4842     * <li> The equation of the origins is the distance between the true
4843     *     equinox and the celestial intermediate origin and, equivalently,
4844     *     the difference between Earth rotation angle and Greenwich
4845     *     apparent sidereal time (ERA-GST).  It comprises the precession
4846     *     (since J2000.0) in right ascension plus the equation of the
4847     *     equinoxes (including the small correction terms).
4848     *</ol>
4849     *<p>Called:<ul>
4850     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
4851     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
4852     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
4853     *     <li>{@link #jauEors} equation of the origins, Given NPB matrix and s
4854     * </ul>
4855     *<p>References:
4856     *
4857     *     <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4858     *
4859     *     <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
4860     *
4861     *@version 2008 May 16
4862     *
4863     *  @since Release 20101201
4864     *
4865     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4866     */
4867     public static double jauEo06a(double date1, double date2)
4868     {
4869        double r[][], s, eo;
4870 
4871 
4872     /* Classical nutation x precession x bias matrix. */
4873        r = jauPnm06a(date1, date2);
4874 
4875     /* Extract CIP coordinates. */
4876        CelestialIntermediatePole cip = jauBpn2xy(r);
4877 
4878     /* The CIO locator, s. */
4879        s = jauS06(date1, date2, cip.x, cip.y);
4880 
4881     /* Solve for the EO. */
4882        eo = jauEors(r, s);
4883 
4884        return eo;
4885 
4886         }
4887     
4888 
4889     /**
4890     *  Equation of the origins, given the classical NPB matrix and the
4891     *  quantity s.
4892     *
4893     *<p>This function is derived from the International Astronomical Union's
4894     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4895     *
4896     *<p>Status:  support function.
4897     *
4898     *<!-- Given: -->
4899     *     @param rnpb   double[3][3]   classical nutation x precession x bias matrix
4900     *     @param s      double         the quantity s (the CIO locator)
4901     *
4902     * <!-- Returned (function value): -->
4903     *  @return double        the equation of the origins in radians.
4904     *
4905     * <p>Notes:
4906     * <ol>
4907     *
4908     * <li>  The equation of the origins is the distance between the true
4909     *      equinox and the celestial intermediate origin and, equivalently,
4910     *      the difference between Earth rotation angle and Greenwich
4911     *      apparent sidereal time (ERA-GST).  It comprises the precession
4912     *      (since J2000.0) in right ascension plus the equation of the
4913     *      equinoxes (including the small correction terms).
4914     *
4915     * <li>  The algorithm is from Wallace &amp; Capitaine (2006).
4916     *</ol>
4917     * References:
4918     *
4919     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4920     *
4921     *    <p>Wallace, P. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
4922     *
4923     *@version 2008 May 26
4924     *
4925     *  @since Release 20101201
4926     *
4927     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4928     */
4929     public static double jauEors(double rnpb[][], double s)
4930     {
4931        double x, ax, xs, ys, zs, p, q, eo;
4932 
4933 
4934     /* Evaluate Wallace &amp; Capitaine (2006) expression (16). */
4935        x = rnpb[2][0];
4936        ax = x / (1.0 + rnpb[2][2]);
4937        xs = 1.0 - ax * x;
4938        ys = -ax * rnpb[2][1];
4939        zs = -x;
4940        p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs;
4941        q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs;
4942        eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s;
4943 
4944        return eo;
4945 
4946         }
4947     
4948 
4949     /**
4950     *  Julian Date to Besselian Epoch.
4951     *
4952     *<p>This function is derived from the International Astronomical Union's
4953     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4954     *
4955     *<p>Status:  support function.
4956     *
4957     *<!-- Given: -->
4958     *     @param dj1 double      Julian Date (see note)
4959     *     @param dj2 double      Julian Date (see note) 
4960     *
4961     * <!-- Returned (function value): -->
4962     *  @return double     Besselian Epoch.
4963     *
4964     *  Note:
4965     *
4966     *     The Julian Date is supplied in two pieces, in the usual JSOFA
4967     *     manner, which is designed to preserve time resolution.  The
4968     *     Julian Date is available as a single number by adding dj1 and
4969     *     dj2.  The maximum resolution is achieved if dj1 is 2451545D0
4970     *     (J2000.0).
4971     *
4972     *<p>Reference:
4973     *
4974     *     Lieske,J.H., 1979. Astron.Astrophys.,73,282.
4975     *
4976     *@version 2009 December 16
4977     *
4978     *  @since Release 20101201
4979     *
4980     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4981     */
4982     public static double jauEpb(double dj1, double dj2)
4983     {
4984     /* J2000.0 minus B1900.0 (2415019.81352) in Julian days */
4985        final double D1900 = 36524.68648;
4986 
4987        return 1900.0 + ((dj1 - DJ00) + (dj2 + D1900)) / DTY;
4988 
4989         }
4990     
4991     /**
4992     *  Besselian Epoch to Julian Date.
4993     *
4994     *<p>This function is derived from the International Astronomical Union's
4995     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4996     *
4997     *<p>Status:  support function.
4998     *
4999     *<!-- Given: -->
5000     *     @param epb       double     Besselian Epoch (e.g. 1957.3D0)
5001     *
5002     *<!-- Returned: -->
5003     *     @return  MJD zero-point: always 2400000.5  Modified Julian Date
5004     *
5005     *  Note:
5006     *
5007     *     The Julian Date is returned in two pieces, in the usual JSOFA
5008     *     manner, which is designed to preserve time resolution.  The
5009     *     Julian Date is available as a single number by adding djm0 and
5010     *     djm.
5011     *
5012     *<p>Reference:
5013     *
5014     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5015     *
5016     *@version 2008 May 24
5017     *
5018     *  @since Release 20101201
5019     *
5020     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5021     */
5022     public static JulianDate jauEpb2jd(double epb)
5023     {
5024         double djm0, djm;
5025        djm0 = 2400000.5;
5026        djm  =   15019.81352 + (epb - 1900.0) * DTY;
5027 
5028        return new JulianDate(djm0, djm);
5029 
5030         }
5031     
5032 
5033     /**
5034     *  Julian Date to Julian Epoch.
5035     *
5036     *<p>This function is derived from the International Astronomical Union's
5037     *  SOFA (Standards Of Fundamental Astronomy) software collection.
5038     *
5039     *<p>Status:  support function.
5040     *
5041     *<!-- Given: -->
5042     *     @param dj1 double      Julian Date (see note)
5043     *     @param dj2 double      Julian Date (see note) 
5044     *
5045     * <!-- Returned (function value): -->
5046     *  @return double     Julian Epoch
5047     *
5048     *  Note:
5049     *
5050     *     The Julian Date is supplied in two pieces, in the usual JSOFA
5051     *     manner, which is designed to preserve time resolution.  The
5052     *     Julian Date is available as a single number by adding dj1 and
5053     *     dj2.  The maximum resolution is achieved if dj1 is 2451545D0
5054     *     (J2000.0).
5055     *
5056     *<p>Reference:
5057     *
5058     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5059     *
5060     *@version 2009 December 16
5061     *
5062     *  @since Release 20101201
5063     *
5064     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5065     */
5066     public static double jauEpj(double dj1, double dj2)
5067     {
5068        return 2000.0 + ((dj1 - DJ00) + dj2) / DJY;
5069 
5070      }
5071     
5072 
5073     /**
5074     *  Julian Epoch to Julian Date.
5075     *
5076     *<p>This function is derived from the International Astronomical Union's
5077     *  SOFA (Standards Of Fundamental Astronomy) software collection.
5078     *
5079     *<p>Status:  support function.
5080     *
5081     *<!-- Given: -->
5082     *     @param epj       double     Julian Epoch (e.g. 1996.8D0)
5083     *
5084     *<!-- Returned: -->
5085     *     @return  MJD zero-point: always 2400000.5  Modified Julian Date
5086     *
5087     *  Note:
5088     *
5089     *     The Julian Date is returned in two pieces, in the usual JSOFA
5090     *     manner, which is designed to preserve time resolution.  The
5091     *     Julian Date is available as a single number by adding djm0 and
5092     *     djm.
5093     *
5094     *<p>Reference:
5095     *
5096     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5097     *
5098     *@version 2008 May 11
5099     *
5100     *  @since Release 20101201
5101     *
5102     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5103     */
5104     public static JulianDate jauEpj2jd(double epj)
5105     {
5106        double djm0, djm;
5107        djm0 = 2400000.5;
5108        djm  =   51544.5 + (epj - 2000.0) * 365.25;
5109 
5110        return new JulianDate(djm0, djm);
5111 
5112         }
5113     
5114 
5115     /*
5116      * A utility class to get round 65536 byte limit on functions in java - The static initializer is too large on its own. - So split into two classes for no real semantic reason
5117      */        
5118     static private final class Ephemeris extends SSB {
5119        
5120 
5121     /**
5122     * ----------------------
5123     * Ephemeris Coefficients
5124     * ----------------------
5125     *
5126     * The ephemeris consists of harmonic terms for predicting (i) the Sun
5127     * to Earth vector and (ii) the Solar-System-barycenter to Sun vector
5128     * respectively.  The coefficients are stored in arrays which, although
5129     * 1-demensional, contain groups of three.  Each triplet of
5130     * coefficients is the amplitude, phase and frequency for one term in
5131     * the model, and each array contains the number of terms called for by
5132     * the model.
5133     *
5134     * There are eighteen such arrays, named as follows:
5135     *<pre>
5136     *     array         model      power of T      component
5137     *
5138     *      e0x      Sun-to-Earth        0              x
5139     *      e0y      Sun-to-Earth        0              y
5140     *      e0z      Sun-to-Earth        0              z
5141     *
5142     *      e1x      Sun-to-Earth        1              x
5143     *      e1y      Sun-to-Earth        1              y
5144     *      e1z      Sun-to-Earth        1              z
5145     *
5146     *      e2x      Sun-to-Earth        2              x
5147     *      e2y      Sun-to-Earth        2              y
5148     *      e2z      Sun-to-Earth        2              z
5149     *
5150     *      s0x      SSB-to-Sun          0              x
5151     *      s0y      SSB-to-Sun          0              y
5152     *      s0z      SSB-to-Sun          0              z
5153     *
5154     *      s1x      SSB-to-Sun          1              x
5155     *      s1y      SSB-to-Sun          1              y
5156     *      s1z      SSB-to-Sun          1              z
5157     *
5158     *      s2x      SSB-to-Sun          2              x
5159     *      s2y      SSB-to-Sun          2              y
5160     *      s2z      SSB-to-Sun          2              z
5161     *<pre>
5162     */
5163 
5164     /* Sun-to-Earth, T^0, X */
5165       static final double e0x[] = {
5166           0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01,
5167           0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02,
5168           0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00,
5169           0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02,
5170           0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02,
5171           0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00,
5172           0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01,
5173           0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01,
5174           0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01,
5175           0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01,
5176 
5177           0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01,
5178           0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02,
5179           0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02,
5180           0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01,
5181           0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01,
5182           0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00,
5183           0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01,
5184           0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01,
5185           0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01,
5186           0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01,
5187 
5188           0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01,
5189           0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01,
5190           0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00,
5191           0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02,
5192           0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01,
5193           0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02,
5194           0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01,
5195           0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01,
5196           0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02,
5197           0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00,
5198 
5199           0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00,
5200           0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01,
5201           0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01,
5202           0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01,
5203           0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02,
5204           0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02,
5205           0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02,
5206           0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01,
5207           0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01,
5208           0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00,
5209 
5210           0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02,
5211           0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01,
5212           0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01,
5213           0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01,
5214           0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02,
5215           0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01,
5216           0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01,
5217           0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03,
5218           0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01,
5219           0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02,
5220 
5221           0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01,
5222           0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01,
5223           0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01,
5224           0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01,
5225           0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01,
5226           0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01,
5227           0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01,
5228           0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01,
5229           0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01,
5230           0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01,
5231 
5232           0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01,
5233           0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01,
5234           0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01,
5235           0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00,
5236           0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01,
5237           0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02,
5238           0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02,
5239           0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02,
5240           0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02,
5241           0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01,
5242 
5243           0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01,
5244           0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01,
5245           0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01,
5246           0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00,
5247           0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01,
5248           0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01,
5249           0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01,
5250           0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01,
5251           0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02,
5252           0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02,
5253 
5254           0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01,
5255           0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01,
5256           0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02,
5257           0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02,
5258           0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02,
5259           0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01,
5260           0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02,
5261           0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01,
5262           0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01,
5263           0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02,
5264 
5265           0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01,
5266           0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02,
5267           0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01,
5268           0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01,
5269           0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01,
5270           0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02,
5271           0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03,
5272           0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01,
5273           0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02,
5274           0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02,
5275 
5276           0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01,
5277           0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02,
5278           0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02,
5279           0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01,
5280           0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01,
5281           0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01,
5282           0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01,
5283           0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01,
5284           0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02,
5285           0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02,
5286 
5287           0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01,
5288           0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01,
5289           0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01,
5290           0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01,
5291           0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02,
5292           0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01,
5293           0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02,
5294           0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01,
5295           0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01,
5296           0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01,
5297 
5298           0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01,
5299           0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01,
5300           0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01,
5301           0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01,
5302           0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02,
5303           0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01,
5304           0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02,
5305           0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02,
5306           0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01,
5307           0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01,
5308 
5309           0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01,
5310           0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00,
5311           0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02,
5312           0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02,
5313           0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00,
5314           0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01,
5315           0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00,
5316           0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00,
5317           0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02,
5318           0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02,
5319 
5320           0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01,
5321           0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02,
5322           0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00,
5323           0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02,
5324           0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00,
5325           0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01,
5326           0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01,
5327           0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01,
5328           0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01,
5329           0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01,
5330 
5331           0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00,
5332           0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02,
5333           0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00,
5334           0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02,
5335           0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02,
5336           0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03,
5337           0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02,
5338           0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01,
5339           0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02,
5340           0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01,
5341 
5342           0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01,
5343           0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01,
5344           0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01,
5345           0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01,
5346           0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01,
5347           0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01,
5348           0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01,
5349           0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02,
5350           0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01,
5351           0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01,
5352 
5353           0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02,
5354           0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01,
5355           0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01,
5356           0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02,
5357           0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01,
5358           0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01,
5359           0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02,
5360           0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01,
5361           0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02,
5362           0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01,
5363 
5364           0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02,
5365           0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02,
5366           0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01,
5367           0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02,
5368           0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02,
5369           0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01,
5370           0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01,
5371           0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01,
5372           0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01,
5373           0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01,
5374 
5375           0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02,
5376           0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03,
5377           0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02,
5378           0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01,
5379           0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02,
5380           0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02,
5381           0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01,
5382           0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01,
5383           0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01,
5384           0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02,
5385 
5386           0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02,
5387           0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02,
5388           0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02,
5389           0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02,
5390           0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01,
5391           0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01,
5392           0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01,
5393           0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01,
5394           0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01,
5395           0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02,
5396 
5397           0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01,
5398           0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00,
5399           0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02,
5400           0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01,
5401           0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01,
5402           0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01,
5403           0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01,
5404           0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02,
5405           0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01,
5406           0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02,
5407 
5408           0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00,
5409           0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02,
5410           0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02,
5411           0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01,
5412           0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02,
5413           0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02,
5414           0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01,
5415           0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01,
5416           0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02,
5417           0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01,
5418 
5419           0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01,
5420           0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01,
5421           0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02,
5422           0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00,
5423           0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01,
5424           0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02,
5425           0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02,
5426           0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02,
5427           0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01,
5428           0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02,
5429 
5430           0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01,
5431           0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02,
5432           0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01,
5433           0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02,
5434           0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00,
5435           0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01,
5436           0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02,
5437           0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01,
5438           0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02,
5439           0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01,
5440 
5441           0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02,
5442           0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02,
5443           0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02,
5444           0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02,
5445           0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01,
5446           0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02,
5447           0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01,
5448           0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00,
5449           0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01,
5450           0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01,
5451 
5452           0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02,
5453           0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01,
5454           0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01,
5455           0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01,
5456           0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01,
5457           0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01,
5458           0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01,
5459           0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02,
5460           0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02,
5461           0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01,
5462 
5463           0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01,
5464           0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02,
5465           0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02,
5466           0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01,
5467           0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01,
5468           0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00,
5469           0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02,
5470           0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01,
5471           0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02,
5472           0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00,
5473 
5474           0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00,
5475           0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01,
5476           0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01,
5477           0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01,
5478           0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01,
5479           0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03,
5480           0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02,
5481           0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01,
5482           0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02,
5483           0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02,
5484 
5485           0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02,
5486           0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01,
5487           0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01,
5488           0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01,
5489           0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01,
5490           0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02,
5491           0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02,
5492           0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01,
5493           0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01,
5494           0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02,
5495 
5496           0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02,
5497           0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02,
5498           0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01,
5499           0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01,
5500           0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03,
5501           0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02,
5502           0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00,
5503           0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00,
5504           0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01,
5505           0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01,
5506 
5507           0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01,
5508           0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02,
5509           0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02,
5510           0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01,
5511           0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02,
5512           0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01,
5513           0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02,
5514           0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02,
5515           0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02,
5516           0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01,
5517 
5518           0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02,
5519           0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00,
5520           0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01,
5521           0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01,
5522           0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01,
5523           0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02,
5524           0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01,
5525           0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02,
5526           0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01,
5527           0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02,
5528 
5529           0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01,
5530           0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01,
5531           0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00,
5532           0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01,
5533           0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01,
5534           0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02,
5535           0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02,
5536           0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01,
5537           0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01,
5538           0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01,
5539 
5540           0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01,
5541           0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03,
5542           0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00,
5543           0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02,
5544           0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02,
5545           0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01,
5546           0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02,
5547           0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01,
5548           0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03,
5549           0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01,
5550 
5551           0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02,
5552           0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02,
5553           0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02,
5554           0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02,
5555           0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01,
5556           0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02,
5557           0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01,
5558           0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01,
5559           0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02,
5560           0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02,
5561 
5562           0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01,
5563           0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02,
5564           0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01,
5565           0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01,
5566           0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02,
5567           0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03,
5568           0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02,
5569           0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01,
5570           0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01,
5571           0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01,
5572 
5573           0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01,
5574           0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02,
5575           0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01,
5576           0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02,
5577           0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03,
5578           0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01,
5579           0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02,
5580           0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01,
5581           0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01,
5582           0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02,
5583 
5584           0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01,
5585           0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00,
5586           0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00,
5587           0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02,
5588           0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02,
5589           0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02,
5590           0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02,
5591           0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02,
5592           0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01,
5593           0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01,
5594 
5595           0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01,
5596           0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01,
5597           0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01,
5598           0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02,
5599           0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01,
5600           0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02,
5601           0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01,
5602           0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02,
5603           0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02,
5604           0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00,
5605 
5606           0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01,
5607           0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01,
5608           0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01,
5609           0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02,
5610           0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02,
5611           0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02,
5612           0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00,
5613           0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02,
5614           0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02,
5615           0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01,
5616 
5617           0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02,
5618           0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01,
5619           0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01,
5620           0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01,
5621           0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01,
5622           0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02,
5623           0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02,
5624           0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02,
5625           0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00,
5626           0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02,
5627 
5628           0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02,
5629           0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02,
5630           0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01,
5631           0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01,
5632           0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02,
5633           0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01,
5634           0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01,
5635           0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01,
5636           0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02,
5637           0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01,
5638 
5639           0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03,
5640           0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01,
5641           0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00,
5642           0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01,
5643           0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02,
5644           0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01,
5645           0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01,
5646           0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01,
5647           0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02,
5648           0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01,
5649 
5650           0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01,
5651           0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02,
5652           0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02,
5653           0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01,
5654           0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01,
5655           0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02,
5656           0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02,
5657           0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01,
5658           0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00,
5659           0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02,
5660 
5661           0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01,
5662           0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02,
5663           0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02,
5664           0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01,
5665           0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01,
5666           0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02,
5667           0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02,
5668           0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02,
5669           0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02,
5670           0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02,
5671 
5672           0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02,
5673           0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03,
5674           0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03,
5675           0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03,
5676           0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02,
5677           0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02,
5678           0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02,
5679           0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02,
5680           0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03,
5681           0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02,
5682 
5683           0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02,
5684           0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02,
5685           0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03,
5686           0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03,
5687           0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02,
5688           0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02,
5689           0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03,
5690           0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02,
5691           0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02,
5692           0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03,
5693 
5694           0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03,
5695           0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02,
5696           0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02,
5697           0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03,
5698           0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03,
5699           0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02,
5700           0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02,
5701           0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03,
5702           0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03,
5703           0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03,
5704 
5705           0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03,
5706           0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03,
5707           0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03,
5708           0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03,
5709           0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03,
5710           0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03,
5711           0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03,
5712           0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03,
5713           0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03,
5714           0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03,
5715 
5716           0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03 };
5717 
5718     /* Sun-to-Earth, T^0, Y */
5719       static final double e0y[] = {
5720           0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01,
5721          -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00,
5722           0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02,
5723           0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02,
5724           0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02,
5725           0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00,
5726           0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01,
5727           0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01,
5728           0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01,
5729           0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01,
5730 
5731           0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01,
5732           0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02,
5733           0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02,
5734           0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01,
5735           0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00,
5736           0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01,
5737           0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01,
5738           0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01,
5739           0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01,
5740           0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01,
5741 
5742           0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01,
5743           0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01,
5744           0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01,
5745           0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00,
5746           0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02,
5747           0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01,
5748           0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02,
5749           0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01,
5750           0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01,
5751           0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02,
5752 
5753           0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00,
5754           0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00,
5755           0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01,
5756           0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01,
5757           0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02,
5758           0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02,
5759           0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01,
5760           0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02,
5761           0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01,
5762           0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01,
5763 
5764           0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00,
5765           0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01,
5766           0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01,
5767           0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01,
5768           0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02,
5769           0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01,
5770           0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01,
5771           0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02,
5772           0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03,
5773           0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01,
5774 
5775           0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01,
5776           0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01,
5777           0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01,
5778           0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02,
5779           0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01,
5780           0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01,
5781           0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01,
5782           0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01,
5783           0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01,
5784           0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01,
5785 
5786           0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01,
5787           0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01,
5788           0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00,
5789           0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01,
5790           0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01,
5791           0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02,
5792           0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02,
5793           0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01,
5794           0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01,
5795           0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01,
5796 
5797           0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01,
5798           0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02,
5799           0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00,
5800           0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01,
5801           0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01,
5802           0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01,
5803           0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02,
5804           0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02,
5805           0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01,
5806           0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01,
5807 
5808           0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01,
5809           0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02,
5810           0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01,
5811           0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02,
5812           0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02,
5813           0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02,
5814           0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02,
5815           0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01,
5816           0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02,
5817           0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01,
5818 
5819           0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01,
5820           0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02,
5821           0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01,
5822           0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01,
5823           0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01,
5824           0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03,
5825           0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01,
5826           0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02,
5827           0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02,
5828           0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02,
5829 
5830           0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02,
5831           0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01,
5832           0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02,
5833           0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01,
5834           0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02,
5835           0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01,
5836           0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01,
5837           0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01,
5838           0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02,
5839           0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02,
5840 
5841           0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02,
5842           0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01,
5843           0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01,
5844           0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01,
5845           0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01,
5846           0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01,
5847           0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01,
5848           0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02,
5849           0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01,
5850           0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01,
5851 
5852           0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01,
5853           0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01,
5854           0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01,
5855           0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01,
5856           0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01,
5857           0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02,
5858           0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02,
5859           0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01,
5860           0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01,
5861           0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01,
5862 
5863           0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02,
5864           0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01,
5865           0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00,
5866           0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02,
5867           0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02,
5868           0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01,
5869           0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00,
5870           0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00,
5871           0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02,
5872           0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00,
5873 
5874           0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02,
5875           0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02,
5876           0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02,
5877           0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02,
5878           0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00,
5879           0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02,
5880           0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01,
5881           0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00,
5882           0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01,
5883           0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01,
5884 
5885           0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01,
5886           0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01,
5887           0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00,
5888           0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01,
5889           0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01,
5890           0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02,
5891           0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02,
5892           0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00,
5893           0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02,
5894           0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03,
5895 
5896           0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01,
5897           0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01,
5898           0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02,
5899           0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01,
5900           0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01,
5901           0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01,
5902           0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01,
5903           0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01,
5904           0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01,
5905           0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01,
5906 
5907           0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01,
5908           0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01,
5909           0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02,
5910           0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01,
5911           0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01,
5912           0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01,
5913           0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01,
5914           0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01,
5915           0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02,
5916           0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02,
5917 
5918           0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02,
5919           0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02,
5920           0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01,
5921           0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02,
5922           0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01,
5923           0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01,
5924           0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01,
5925           0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02,
5926           0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02,
5927           0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01,
5928 
5929           0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01,
5930           0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02,
5931           0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01,
5932           0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02,
5933           0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02,
5934           0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03,
5935           0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01,
5936           0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01,
5937           0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02,
5938           0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02,
5939 
5940           0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02,
5941           0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02,
5942           0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02,
5943           0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01,
5944           0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01,
5945           0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01,
5946           0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01,
5947           0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01,
5948           0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02,
5949           0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01,
5950 
5951           0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00,
5952           0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02,
5953           0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02,
5954           0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01,
5955           0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01,
5956           0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01,
5957           0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02,
5958           0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01,
5959           0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02,
5960           0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01,
5961 
5962           0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02,
5963           0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01,
5964           0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00,
5965           0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02,
5966           0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02,
5967           0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01,
5968           0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02,
5969           0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01,
5970           0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01,
5971           0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00,
5972 
5973           0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02,
5974           0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01,
5975           0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01,
5976           0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01,
5977           0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02,
5978           0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02,
5979           0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01,
5980           0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01,
5981           0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00,
5982           0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01,
5983 
5984           0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02,
5985           0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01,
5986           0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02,
5987           0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01,
5988           0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02,
5989           0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01,
5990           0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02,
5991           0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01,
5992           0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02,
5993           0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02,
5994 
5995           0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02,
5996           0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02,
5997           0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01,
5998           0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01,
5999           0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01,
6000           0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02,
6001           0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02,
6002           0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00,
6003           0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01,
6004           0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02,
6005 
6006           0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01,
6007           0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01,
6008           0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01,
6009           0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01,
6010           0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01,
6011           0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01,
6012           0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02,
6013           0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01,
6014           0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02,
6015           0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02,
6016 
6017           0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02,
6018           0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01,
6019           0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01,
6020           0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02,
6021           0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00,
6022           0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01,
6023           0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00,
6024           0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02,
6025           0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02,
6026           0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00,
6027 
6028           0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01,
6029           0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01,
6030           0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02,
6031           0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01,
6032           0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01,
6033           0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01,
6034           0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01,
6035           0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01,
6036           0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01,
6037           0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03,
6038 
6039           0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02,
6040           0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02,
6041           0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02,
6042           0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01,
6043           0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02,
6044           0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02,
6045           0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01,
6046           0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01,
6047           0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01,
6048           0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02,
6049 
6050           0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01,
6051           0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01,
6052           0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02,
6053           0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01,
6054           0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01,
6055           0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02,
6056           0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01,
6057           0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03,
6058           0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00,
6059           0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01,
6060 
6061           0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00,
6062           0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02,
6063           0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02,
6064           0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02,
6065           0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02,
6066           0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01,
6067           0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02,
6068           0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02,
6069           0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01,
6070           0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02,
6071 
6072           0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02,
6073           0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02,
6074           0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01,
6075           0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02,
6076           0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00,
6077           0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01,
6078           0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01,
6079           0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02,
6080           0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02,
6081           0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01,
6082 
6083           0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00,
6084           0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02,
6085           0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01,
6086           0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01,
6087           0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01,
6088           0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02,
6089           0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01,
6090           0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01,
6091           0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01,
6092           0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03,
6093 
6094           0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02,
6095           0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02,
6096           0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02,
6097           0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01,
6098           0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01,
6099           0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01,
6100           0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03,
6101           0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01,
6102           0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01,
6103           0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02,
6104 
6105           0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02,
6106           0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02,
6107           0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01,
6108           0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01,
6109           0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01,
6110           0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02,
6111           0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01,
6112           0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02,
6113           0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01,
6114           0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01,
6115 
6116           0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01,
6117           0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03,
6118           0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02,
6119           0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02,
6120           0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02,
6121           0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01,
6122           0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02,
6123           0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01,
6124           0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01,
6125           0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01,
6126 
6127           0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01,
6128           0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02,
6129           0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02,
6130           0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03,
6131           0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01,
6132           0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01,
6133           0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02,
6134           0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01,
6135           0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02,
6136           0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01,
6137 
6138           0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00,
6139           0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02,
6140           0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02,
6141           0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02,
6142           0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00,
6143           0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02,
6144           0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02,
6145           0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01,
6146           0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01,
6147           0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01,
6148 
6149           0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01,
6150           0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01,
6151           0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01,
6152           0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02,
6153           0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01,
6154           0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01,
6155           0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02,
6156           0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01,
6157           0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02,
6158           0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01,
6159 
6160           0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01,
6161           0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02,
6162           0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00,
6163           0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00,
6164           0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02,
6165           0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02,
6166           0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02,
6167           0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01,
6168           0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02,
6169           0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02,
6170 
6171           0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01,
6172           0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02,
6173           0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01,
6174           0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01,
6175           0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01,
6176           0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01,
6177           0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02,
6178           0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02,
6179           0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02,
6180           0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01,
6181 
6182           0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01,
6183           0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01,
6184           0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02,
6185           0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02,
6186           0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02,
6187           0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01,
6188           0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01,
6189           0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03,
6190           0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00,
6191           0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00,
6192 
6193           0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01,
6194           0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00,
6195           0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02,
6196           0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01,
6197           0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02,
6198           0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01,
6199           0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02,
6200           0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01,
6201           0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02,
6202           0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01,
6203 
6204           0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01,
6205           0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02,
6206           0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02,
6207           0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01,
6208           0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01,
6209           0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02,
6210           0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02,
6211           0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00,
6212           0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02,
6213           0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02,
6214 
6215           0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01,
6216           0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00,
6217           0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02,
6218           0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02,
6219           0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01,
6220           0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01,
6221           0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02,
6222           0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02,
6223           0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02,
6224           0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03,
6225 
6226           0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03,
6227           0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03,
6228           0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02,
6229           0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02,
6230           0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02,
6231           0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02,
6232           0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02,
6233           0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03,
6234           0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02,
6235           0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02,
6236 
6237           0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02,
6238           0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02,
6239           0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02,
6240           0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03,
6241           0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03,
6242           0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02,
6243           0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02,
6244           0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03,
6245           0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02,
6246           0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02,
6247 
6248           0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03,
6249           0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03,
6250           0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02,
6251           0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02,
6252           0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03,
6253           0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02,
6254           0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03,
6255           0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03,
6256           0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03,
6257           0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02,
6258 
6259           0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03,
6260           0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03,
6261           0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03,
6262           0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03,
6263           0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03,
6264           0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03,
6265           0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03,
6266           0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03,
6267           0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03,
6268           0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03,
6269 
6270           0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03 };
6271 
6272     /* Sun-to-Earth, T^0, Z */
6273       static final double e0z[] = {
6274           0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02,
6275           0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01,
6276           0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01,
6277           0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01,
6278           0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01,
6279           0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01,
6280           0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01,
6281           0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01,
6282           0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01,
6283           0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02,
6284 
6285           0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02,
6286           0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01,
6287           0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01,
6288           0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02,
6289           0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01,
6290           0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01,
6291           0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01,
6292           0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01,
6293           0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00,
6294           0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03,
6295 
6296           0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02,
6297           0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01,
6298           0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01,
6299           0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01,
6300           0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01,
6301           0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01,
6302           0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01,
6303           0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02,
6304           0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01,
6305           0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01,
6306 
6307           0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01,
6308           0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01,
6309           0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02,
6310           0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02,
6311           0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01,
6312           0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02,
6313           0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01,
6314           0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01,
6315           0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01,
6316           0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02,
6317 
6318           0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02,
6319           0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00,
6320           0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01,
6321           0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01,
6322           0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02,
6323           0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01,
6324           0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02,
6325           0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03,
6326           0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01,
6327           0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01,
6328 
6329           0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01,
6330           0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01,
6331          -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6332           0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01,
6333           0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02,
6334           0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02,
6335           0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02,
6336           0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02,
6337           0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02,
6338           0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01,
6339 
6340           0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01,
6341           0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00,
6342           0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01,
6343           0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02,
6344           0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01,
6345           0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00,
6346           0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02,
6347           0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00,
6348           0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01,
6349           0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01,
6350 
6351           0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00,
6352           0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02,
6353           0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02,
6354           0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01,
6355           0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01,
6356           0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01,
6357           0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00,
6358           0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02,
6359           0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01,
6360           0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01,
6361 
6362           0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03,
6363           0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02,
6364           0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01,
6365           0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01,
6366           0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01,
6367           0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02,
6368           0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02,
6369           0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01,
6370           0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01,
6371           0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01,
6372 
6373           0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01,
6374           0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02,
6375           0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01,
6376           0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01,
6377           0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02,
6378           0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01,
6379           0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02,
6380           0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01,
6381           0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01,
6382           0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01,
6383 
6384           0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01,
6385           0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01,
6386           0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01,
6387           0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02,
6388           0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03,
6389           0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01,
6390           0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02,
6391           0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00,
6392           0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02,
6393           0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02,
6394 
6395           0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03,
6396           0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02,
6397           0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02,
6398           0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02,
6399           0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02,
6400           0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02,
6401           0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02,
6402           0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02,
6403           0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02,
6404           0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02,
6405 
6406           0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02,
6407           0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02,
6408           0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03,
6409           0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02,
6410           0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02,
6411           0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03,
6412           0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02,
6413           0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03,
6414           0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03,
6415           0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03,
6416 
6417           0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03,
6418           0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03,
6419           0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02,
6420           0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03,
6421           0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03,
6422           0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03,
6423           0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03 };
6424 
6425     /* Sun-to-Earth, T^1, X */
6426       static final double e1x[] = {
6427           0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00,
6428           0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02,
6429           0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02,
6430           0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01,
6431           0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01,
6432           0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01,
6433           0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01,
6434           0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01,
6435           0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01,
6436           0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00,
6437 
6438           0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01,
6439           0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01,
6440           0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01,
6441           0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01,
6442           0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01,
6443           0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01,
6444           0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02,
6445           0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01,
6446           0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01,
6447           0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01,
6448 
6449           0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01,
6450           0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01,
6451           0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01,
6452           0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01,
6453           0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02,
6454           0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02,
6455           0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01,
6456           0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02,
6457           0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00,
6458           0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01,
6459 
6460           0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01,
6461           0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01,
6462           0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01,
6463           0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01,
6464           0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01,
6465           0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01,
6466           0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01,
6467           0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01,
6468           0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01,
6469           0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01,
6470 
6471           0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01,
6472           0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01,
6473           0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02,
6474           0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01,
6475           0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02,
6476           0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01,
6477           0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01,
6478           0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01,
6479           0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02,
6480           0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01,
6481 
6482           0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01,
6483           0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01,
6484           0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01,
6485           0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01,
6486           0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01,
6487           0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01,
6488           0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01,
6489           0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02,
6490           0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01,
6491           0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02,
6492 
6493           0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01,
6494           0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01,
6495           0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01,
6496           0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01,
6497           0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01,
6498           0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01,
6499           0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00,
6500           0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00,
6501           0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00,
6502           0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00,
6503 
6504           0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01,
6505           0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01,
6506           0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02,
6507           0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01,
6508           0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01,
6509           0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01,
6510           0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01,
6511           0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01,
6512           0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01 };
6513 
6514     /* Sun-to-Earth, T^1, Y */
6515       static final double e1y[] = {
6516           0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00,
6517           0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02,
6518           0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02,
6519           0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01,
6520           0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01,
6521           0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01,
6522           0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01,
6523           0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01,
6524           0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01,
6525           0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00,
6526 
6527           0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01,
6528           0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01,
6529           0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01,
6530           0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01,
6531           0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01,
6532           0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01,
6533           0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02,
6534           0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01,
6535           0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01,
6536           0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01,
6537 
6538           0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01,
6539           0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01,
6540           0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01,
6541           0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01,
6542           0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02,
6543           0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02,
6544           0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02,
6545           0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01,
6546           0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00,
6547           0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01,
6548 
6549           0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01,
6550           0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01,
6551           0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01,
6552           0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01,
6553           0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01,
6554           0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01,
6555           0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01,
6556           0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01,
6557           0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01,
6558           0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01,
6559 
6560           0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01,
6561           0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01,
6562           0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02,
6563           0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02,
6564           0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01,
6565           0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01,
6566           0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01,
6567           0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01,
6568           0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02,
6569           0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01,
6570 
6571           0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01,
6572           0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01,
6573           0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01,
6574           0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01,
6575           0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01,
6576           0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01,
6577           0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02,
6578           0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01,
6579           0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02,
6580           0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01,
6581 
6582           0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01,
6583           0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01,
6584           0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01,
6585           0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01,
6586           0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00,
6587           0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00,
6588           0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01,
6589           0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01,
6590           0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00,
6591           0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00,
6592 
6593           0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00,
6594           0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01,
6595           0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01,
6596           0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02,
6597           0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01,
6598           0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01,
6599           0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01,
6600           0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01,
6601           0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01,
6602           0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02 };
6603 
6604     /* Sun-to-Earth, T^1, Z */
6605       static final double e1z[] = {
6606           0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01,
6607           0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6608           0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02,
6609           0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02,
6610           0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01,
6611           0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01,
6612           0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01,
6613           0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02,
6614           0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00,
6615           0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01,
6616 
6617           0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01,
6618           0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02 };
6619 
6620     /* Sun-to-Earth, T^2, X */
6621       static final double e2x[] = {
6622          -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6623           0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02,
6624           0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01,
6625           0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02,
6626           0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02 };
6627 
6628     /* Sun-to-Earth, T^2, Y */
6629       static final double e2y[] = {
6630           0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6631           0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02,
6632           0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01,
6633           0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02,
6634           0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02 };
6635 
6636     /* Sun-to-Earth, T^2, Z */
6637       static final double e2z[] = {
6638           0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01,
6639          -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00,
6640           0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02 };
6641 
6642     }
6643       //subclassed the 
6644       private static class SSB {
6645     /* SSB-to-Sun, T^0, X */
6646       static final double s0x[] = {
6647           0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00,
6648           0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00,
6649           0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01,
6650           0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01,
6651           0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6652           0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01,
6653           0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00,
6654           0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00,
6655           0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00,
6656           0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00,
6657 
6658           0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00,
6659           0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00,
6660           0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01,
6661           0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01,
6662           0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01,
6663           0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01,
6664           0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01,
6665           0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02,
6666           0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00,
6667           0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00,
6668 
6669           0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00,
6670           0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01,
6671           0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00,
6672           0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00,
6673           0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02,
6674           0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02,
6675           0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00,
6676           0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00,
6677           0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01,
6678           0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01,
6679 
6680           0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01,
6681           0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00,
6682           0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00,
6683           0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00,
6684           0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00,
6685           0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01,
6686           0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01,
6687           0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01,
6688           0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01,
6689           0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00,
6690 
6691           0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01,
6692           0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00,
6693           0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01,
6694           0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01,
6695           0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01,
6696           0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01,
6697           0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02,
6698           0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01,
6699           0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00,
6700           0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00,
6701 
6702           0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00,
6703           0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00,
6704           0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00,
6705           0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00,
6706           0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00,
6707           0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00,
6708           0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00,
6709           0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00,
6710           0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00,
6711           0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00,
6712 
6713           0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00,
6714           0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01,
6715           0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00,
6716           0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01,
6717           0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00,
6718           0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00,
6719           0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00,
6720           0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01,
6721           0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00,
6722           0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01,
6723 
6724           0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00,
6725           0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01,
6726           0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01,
6727           0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01,
6728           0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00,
6729           0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00,
6730           0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01,
6731           0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02,
6732           0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00,
6733           0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01,
6734 
6735           0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00,
6736           0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01,
6737           0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00,
6738           0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00,
6739           0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00,
6740           0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01,
6741           0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00,
6742           0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00,
6743           0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00,
6744           0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00,
6745 
6746           0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00,
6747           0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02,
6748           0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01,
6749           0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01,
6750           0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01,
6751           0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01,
6752           0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01,
6753           0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02,
6754           0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00,
6755           0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01,
6756 
6757           0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00,
6758           0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00,
6759           0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00,
6760           0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00,
6761           0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01,
6762           0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00,
6763           0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00,
6764           0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00,
6765           0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01,
6766           0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00,
6767 
6768           0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01,
6769           0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00,
6770           0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01,
6771           0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01,
6772           0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01,
6773           0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00,
6774           0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00,
6775           0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00,
6776           0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00,
6777           0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01,
6778 
6779           0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00,
6780           0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00,
6781           0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00,
6782           0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00,
6783           0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00,
6784           0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00,
6785           0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00,
6786           0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00,
6787           0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00,
6788           0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01,
6789 
6790           0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02,
6791           0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01,
6792           0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00,
6793           0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02,
6794           0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00,
6795           0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01,
6796           0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01,
6797           0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00,
6798           0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01,
6799           0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00,
6800 
6801           0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00,
6802           0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02,
6803           0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01,
6804           0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01,
6805           0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01,
6806           0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00,
6807           0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01,
6808           0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00,
6809           0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00,
6810           0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00,
6811 
6812           0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00,
6813           0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01,
6814           0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01,
6815           0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00,
6816           0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01,
6817           0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00,
6818           0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01,
6819           0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01,
6820           0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01,
6821           0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00,
6822 
6823           0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00,
6824           0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00,
6825           0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00,
6826           0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01,
6827           0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00,
6828           0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01,
6829           0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01,
6830           0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00,
6831           0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01,
6832           0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01,
6833 
6834           0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01,
6835           0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00,
6836           0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00,
6837           0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00,
6838           0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00,
6839           0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00,
6840           0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02,
6841           0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00,
6842           0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02,
6843           0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00,
6844 
6845           0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00,
6846           0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01,
6847           0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00,
6848           0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00,
6849           0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00,
6850           0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00,
6851           0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00,
6852           0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00,
6853           0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00,
6854           0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01,
6855 
6856           0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00,
6857           0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00,
6858           0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01,
6859           0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00,
6860           0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00,
6861           0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01,
6862           0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00,
6863           0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00,
6864           0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00,
6865           0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00,
6866 
6867           0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00,
6868           0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00,
6869           0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00,
6870           0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00,
6871           0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00,
6872           0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00,
6873           0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01,
6874           0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01,
6875           0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00,
6876           0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00,
6877 
6878           0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01,
6879           0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02 };
6880 
6881     /* SSB-to-Sun, T^0, Y */
6882       static final double s0y[] = {
6883           0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00,
6884           0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00,
6885           0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01,
6886           0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01,
6887           0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6888           0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01,
6889           0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00,
6890           0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00,
6891           0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00,
6892           0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00,
6893 
6894           0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00,
6895           0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00,
6896           0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01,
6897           0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01,
6898           0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01,
6899           0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01,
6900           0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01,
6901           0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02,
6902           0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00,
6903           0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00,
6904 
6905           0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00,
6906           0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01,
6907           0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00,
6908           0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00,
6909           0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02,
6910           0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02,
6911           0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00,
6912           0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00,
6913           0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01,
6914           0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01,
6915 
6916           0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01,
6917           0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00,
6918           0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00,
6919           0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00,
6920           0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00,
6921           0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01,
6922           0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01,
6923           0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01,
6924           0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01,
6925           0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00,
6926 
6927           0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01,
6928           0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00,
6929           0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01,
6930           0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01,
6931           0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01,
6932           0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01,
6933           0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02,
6934           0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01,
6935           0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00,
6936           0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00,
6937 
6938           0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00,
6939           0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00,
6940           0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00,
6941           0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00,
6942           0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00,
6943           0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00,
6944           0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00,
6945           0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00,
6946           0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00,
6947           0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00,
6948 
6949           0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00,
6950           0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01,
6951           0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00,
6952           0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00,
6953           0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01,
6954           0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00,
6955           0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00,
6956           0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01,
6957           0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00,
6958           0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01,
6959 
6960           0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00,
6961           0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01,
6962           0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01,
6963           0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01,
6964           0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00,
6965           0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00,
6966           0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01,
6967           0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02,
6968           0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00,
6969           0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01,
6970 
6971           0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00,
6972           0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00,
6973           0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01,
6974           0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00,
6975           0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00,
6976           0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01,
6977           0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00,
6978           0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00,
6979           0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00,
6980           0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00,
6981 
6982           0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00,
6983           0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00,
6984           0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02,
6985           0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01,
6986           0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02,
6987           0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01,
6988           0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01,
6989           0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01,
6990           0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01,
6991           0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00,
6992 
6993           0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02,
6994           0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00,
6995           0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00,
6996           0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00,
6997           0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00,
6998           0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01,
6999           0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01,
7000           0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00,
7001           0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00,
7002           0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01,
7003 
7004           0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00,
7005           0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00,
7006           0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01,
7007           0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01,
7008           0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01,
7009           0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01,
7010           0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00,
7011           0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00,
7012           0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00,
7013           0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01,
7014 
7015           0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00,
7016           0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00,
7017           0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00,
7018           0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00,
7019           0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00,
7020           0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00,
7021           0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00,
7022           0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00,
7023           0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00,
7024           0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01,
7025 
7026           0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01,
7027           0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02,
7028           0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00,
7029           0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02,
7030           0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01,
7031           0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00,
7032           0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01,
7033           0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00,
7034           0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00,
7035           0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00,
7036 
7037           0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00,
7038           0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01,
7039           0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02,
7040           0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01,
7041           0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01,
7042           0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01,
7043           0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01,
7044           0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00,
7045           0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00,
7046           0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00,
7047 
7048           0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01,
7049           0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01,
7050           0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00,
7051           0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01,
7052           0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00,
7053           0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01,
7054           0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01,
7055           0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00,
7056           0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01,
7057           0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00,
7058 
7059           0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00,
7060           0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00,
7061           0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00,
7062           0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00,
7063           0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01,
7064           0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00,
7065           0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01,
7066           0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01,
7067           0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02,
7068           0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01,
7069 
7070           0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00,
7071           0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00,
7072           0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00,
7073           0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00,
7074           0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00,
7075           0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00,
7076           0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00,
7077           0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00,
7078           0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00,
7079           0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01,
7080 
7081           0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00,
7082           0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00,
7083           0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00,
7084           0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00,
7085           0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00,
7086           0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00,
7087           0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01,
7088           0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00,
7089           0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01,
7090           0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01,
7091 
7092           0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01,
7093           0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00,
7094           0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00,
7095           0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00,
7096           0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01,
7097           0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00,
7098           0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00,
7099           0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00,
7100           0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00,
7101           0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00,
7102 
7103           0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00,
7104           0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00,
7105           0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00,
7106           0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00,
7107           0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00,
7108           0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00,
7109           0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01,
7110           0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01,
7111           0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00,
7112           0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00,
7113 
7114           0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01,
7115           0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01,
7116           0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02 };
7117 
7118     /* SSB-to-Sun, T^0, Z */
7119       static  final double s0z[] = {
7120           0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00,
7121           0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00,
7122           0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01,
7123           0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01,
7124          -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00,
7125           0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00,
7126           0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01,
7127           0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00,
7128           0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00,
7129           0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00,
7130 
7131           0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00,
7132           0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01,
7133           0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00,
7134           0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01,
7135           0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01,
7136           0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02,
7137           0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00,
7138           0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00,
7139           0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00,
7140           0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00,
7141 
7142           0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01,
7143           0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02,
7144           0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01,
7145           0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01,
7146           0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00,
7147           0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00,
7148           0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02,
7149           0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00,
7150           0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01,
7151           0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01,
7152 
7153           0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00,
7154           0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01,
7155           0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01,
7156           0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00,
7157           0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01,
7158           0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00,
7159           0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02,
7160           0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00,
7161           0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01,
7162           0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00,
7163 
7164           0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01,
7165           0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02,
7166           0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00,
7167           0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00,
7168           0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01,
7169           0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00,
7170           0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00,
7171           0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01,
7172           0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00,
7173           0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01,
7174 
7175           0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00,
7176           0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01,
7177           0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01,
7178           0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00,
7179           0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00,
7180           0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00,
7181           0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01,
7182           0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00,
7183           0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00,
7184           0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00,
7185 
7186           0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00,
7187           0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00,
7188           0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00,
7189           0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01,
7190           0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00,
7191           0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00,
7192           0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00,
7193           0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00,
7194           0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02 };
7195 
7196     /* SSB-to-Sun, T^1, X */
7197       static  final double s1x[] = {
7198          -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00,
7199           0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00,
7200           0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00,
7201           0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00,
7202           0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01,
7203           0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00,
7204           0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00,
7205           0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02,
7206           0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00,
7207           0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00,
7208 
7209           0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00,
7210           0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00,
7211           0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01,
7212           0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01,
7213           0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00,
7214           0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01,
7215           0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00,
7216           0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00,
7217           0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00,
7218           0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00,
7219 
7220           0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01,
7221           0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00,
7222           0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01,
7223           0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00,
7224           0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01,
7225           0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01,
7226           0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00,
7227           0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00,
7228           0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00,
7229           0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00,
7230 
7231           0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00,
7232           0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00,
7233           0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00,
7234           0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00,
7235           0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00,
7236           0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00,
7237           0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01,
7238           0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00,
7239           0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01,
7240           0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00,
7241 
7242           0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00,
7243           0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00,
7244           0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01,
7245           0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01,
7246           0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00,
7247           0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00,
7248           0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00,
7249           0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00,
7250           0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01,
7251           0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01 };
7252 
7253     /* SSB-to-Sun, T^1, Y */
7254       static  final double s1y[] = {
7255           0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00,
7256           0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00,
7257           0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00,
7258           0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01,
7259           0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00,
7260           0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00,
7261           0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02,
7262           0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00,
7263           0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00,
7264           0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00,
7265 
7266           0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00,
7267           0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00,
7268           0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01,
7269           0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01,
7270           0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01,
7271           0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00,
7272           0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00,
7273           0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00,
7274           0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00,
7275           0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01,
7276 
7277           0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00,
7278           0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01,
7279           0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00,
7280           0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01,
7281           0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01,
7282           0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00,
7283           0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00,
7284           0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00,
7285           0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00,
7286           0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00,
7287 
7288           0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00,
7289           0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00,
7290           0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00,
7291           0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00,
7292           0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00,
7293           0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00,
7294           0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01,
7295           0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00,
7296           0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01,
7297           0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00,
7298 
7299           0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00,
7300           0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00,
7301           0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01,
7302           0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01,
7303           0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00,
7304           0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00,
7305           0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00,
7306           0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00,
7307           0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01,
7308           0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01 };
7309 
7310     /* SSB-to-Sun, T^1, Z */
7311       static final double s1z[] = {
7312           0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00,
7313           0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00,
7314           0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00,
7315           0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00,
7316           0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00,
7317           0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01,
7318           0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00,
7319           0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01,
7320           0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00,
7321           0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00,
7322 
7323           0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01,
7324           0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00,
7325           0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02,
7326           0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00 };
7327 
7328     /* SSB-to-Sun, T^2, X */
7329       static  final double s2x[] = {
7330           0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00,
7331           0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00,
7332           0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00,
7333           0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00,
7334           0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00,
7335           0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00,
7336           0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00,
7337           0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01,
7338           0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00 };
7339 
7340     /* SSB-to-Sun, T^2, Y */
7341       static final double s2y[] = {
7342           0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00,
7343           0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00,
7344           0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00,
7345           0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00,
7346           0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00,
7347           0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00,
7348           0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00,
7349          -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00,
7350           0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01 };
7351 
7352     /* SSB-to-Sun, T^2, Z */
7353       static final double s2z[] = {
7354           0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00,
7355           0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00 };
7356         }
7357       
7358         /**
7359          *  Earth position and velocity, heliocentric and barycentric, with
7360          *  respect to the Barycentric Celestial Reference System.
7361          *
7362          *<p>This function is derived from the International Astronomical Union's
7363          *  SOFA (Standards Of Fundamental Astronomy) software collection.
7364          *
7365          *<p>Status:  support function.
7366          *
7367          *<!-- Given: -->
7368          *     @param date1 double         TDB date (Note 1)
7369          *     @param date2 double         TDB date (Note 1) 
7370          *
7371          *<!-- Returned: -->
7372          *     @param pvh           double[2][3]    <u>returned</u> heliocentric Earth position/velocity (au, au/d)
7373          *     @param pvb           double[2][3]    <u>returned</u> barycentric Earth position/velocity (au, au/d)
7374          *
7375          * <!-- Returned (function value): -->
7376          *  @return int           status: 0 = OK
7377          *                                       +1 = warning: date outside
7378          *                                            the range 1900-2100 AD
7379          *
7380          * <p>Notes:
7381          * <ol>
7382          *
7383          * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
7384          *     convenient way between the two arguments.  For example,
7385          *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
7386          *     others:
7387          *<pre>
7388          *            date1          date2
7389          *
7390          *         2450123.7           0.0       (JD method)
7391          *         2451545.0       -1421.3       (J2000 method)
7392          *         2400000.5       50123.2       (MJD method)
7393          *         2450123.5           0.2       (date &amp; time method)
7394          *</pre>
7395          *     The JD method is the most natural and convenient to use in cases
7396          *     where the loss of several decimal digits of resolution is
7397          *     acceptable.  The J2000 method is best matched to the way the
7398          *     argument is handled internally and will deliver the optimum
7399          *     resolution.  The MJD method and the date &amp; time methods are both
7400          *     good compromises between resolution and convenience.  However,
7401          *     the accuracy of the result is more likely to be limited by the
7402          *     algorithm itself than the way the date has been expressed.
7403          *
7404          *     n.b. TT can be used instead of TDB in most applications.
7405          *
7406          * <li> On return, the arrays pvh and pvb contain the following:
7407          *
7408          *        pvh[0][0]  x       }
7409          *        pvh[0][1]  y       } heliocentric position, au
7410          *        pvh[0][2]  z       }
7411          *
7412          *        pvh[1][0]  xdot    }
7413          *        pvh[1][1]  ydot    } heliocentric velocity, au/d
7414          *        pvh[1][2]  zdot    }
7415          *
7416          *        pvb[0][0]  x       }
7417          *        pvb[0][1]  y       } barycentric position, au
7418          *        pvb[0][2]  z       }
7419          *
7420          *        pvb[1][0]  xdot    }
7421          *        pvb[1][1]  ydot    } barycentric velocity, au/d
7422          *        pvb[1][2]  zdot    }
7423          *
7424          *     The vectors are with respect to the Barycentric Celestial
7425          *     Reference System.  The time unit is one day in TDB.
7426          *
7427          * <li> The function is a SIMPLIFIED SOLUTION from the planetary theory
7428          *     VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics &amp;
7429          *     Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original
7430          *     Fortran code supplied by P. Bretagnon (private comm., 2000).
7431          *
7432          * <li> Comparisons over the time span 1900-2100 with this simplified
7433          *     solution and the JPL DE405 ephemeris give the following results:
7434          *
7435          *                                RMS    max
7436          *           Heliocentric:
7437          *              position error    3.7   11.2   km
7438          *              velocity error    1.4    5.0   mm/s
7439          *
7440          *           Barycentric:
7441          *              position error    4.6   13.4   km
7442          *              velocity error    1.4    4.9   mm/s
7443          *
7444          *     Comparisons with the JPL DE406 ephemeris show that by 1800 and
7445          *     2200 the position errors are approximately double their 1900-2100
7446          *     size.  By 1500 and 2500 the deterioration is a factor of 10 and
7447          *     by 1000 and 3000 a factor of 60.  The velocity accuracy falls off
7448          *     at about half that rate.
7449          *
7450          * <li> It is permissible to use the same array for pvh and pvb, which
7451          *     will receive the barycentric values.
7452          *</ol>
7453          *@version 2008 November 18
7454          *
7455          *  @since Release 20101201
7456          *
7457          *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7458          */
7459          public static int jauEpv00(final double date1, final double date2,
7460                       double pvh[][], double pvb[][])
7461          {
7462          /*
7463          * Matrix elements for orienting the analytical model to DE405.
7464          *
7465          * The corresponding Euler angles are:
7466          *
7467          *                       d  '  "
7468          *   1st rotation    -  23 26 21.4091 about the x-axis  (obliquity)
7469          *   2nd rotation    +         0.0475 about the z-axis  (RA offset)
7470          *
7471          * These were obtained empirically, by comparisons with DE405 over
7472          * 1900-2100.
7473          */
7474             final double am12 =  0.000000211284,
7475                                 am13 = -0.000000091603,
7476                                 am21 = -0.000000230286,
7477                                 am22 =  0.917482137087,
7478                                 am23 = -0.397776982902,
7479                                 am32 =  0.397776982902,
7480                                 am33 =  0.917482137087;
7481             
7482       
7483         
7484         
7485     /* Pointers to coefficient arrays, in x,y,z sets */
7486        final double ce0[][] = { Ephemeris.e0x, Ephemeris.e0y, Ephemeris.e0z },
7487                            ce1[][] = { Ephemeris.e1x, Ephemeris.e1y, Ephemeris.e1z },
7488                            ce2[][] = { Ephemeris.e2x, Ephemeris.e2y, Ephemeris.e2z },
7489                            cs0[][] = { Ephemeris.s0x, Ephemeris.s0y, Ephemeris.s0z },
7490                            cs1[][] = { Ephemeris.s1x, Ephemeris.s1y, Ephemeris.s1z },
7491                            cs2[][] = { Ephemeris.s2x, Ephemeris.s2y, Ephemeris.s2z };
7492        /* Numbers of terms for each component of the model, in x,y,z sets */
7493        final int ne0[] = {Ephemeris.e0x.length/3,
7494                Ephemeris.e0y.length/3,
7495                Ephemeris.e0z.length/3 },
7496                         ne1[] = {Ephemeris.e1x.length/3,
7497                Ephemeris.e1y.length/3,
7498                Ephemeris.e1z.length/3 },
7499                         ne2[] = {Ephemeris.e2x.length/3,
7500                Ephemeris.e2y.length/3,
7501                Ephemeris.e2z.length/3 },
7502                         ns0[] = {Ephemeris.s0x.length/3,
7503                Ephemeris.s0y.length/3,
7504                Ephemeris.s0z.length/3 },
7505                         ns1[] = {Ephemeris.s1x.length/3,
7506                Ephemeris.s1y.length/3,
7507                Ephemeris.s1z.length/3 },
7508                         ns2[] = {Ephemeris.s2x.length/3,
7509                Ephemeris.s2y.length/3,
7510                Ephemeris.s2z.length/3 };
7511        int nterms;
7512 
7513     /* Miscellaneous */
7514        int jstat, i, j;
7515        double t, t2, xyz, xyzd, a, b, c, ct, p, cp,
7516               ph[] = new double[3], vh[] = new double[3], pb[] = new double[3], vb[] = new double[3], x, y, z;
7517 
7518     /*--------------------------------------------------------------------*/
7519 
7520     /* Time since reference epoch, Julian years. */
7521        t = ((date1 - DJ00) + date2) / DJY;
7522        t2 = t*t;
7523 
7524     /* Set status. */
7525        jstat = abs(t) <= 100.0 ? 0 : 1;
7526 
7527     /* X then Y then Z. */
7528        for (i = 0; i < 3; i++) {
7529 
7530        /* Initialize position and velocity component. */
7531           xyz = 0.0;
7532           xyzd = 0.0;
7533 
7534        /* ------------------------------------------------ */
7535        /* Obtain component of Sun to Earth ecliptic vector */
7536        /* ------------------------------------------------ */
7537 
7538        /* Sun to Earth, T^0 terms. */
7539           nterms = ne0[i];
7540           int idx;
7541           for (j = 0, idx=0; j < nterms; j++) {
7542              a = ce0[i][idx++];
7543              b = ce0[i][idx++];
7544              c = ce0[i][idx++];
7545              p = b + c*t;
7546              xyz  += a*cos(p);
7547              xyzd -= a*c*sin(p);
7548           }
7549 
7550        /* Sun to Earth, T^1 terms. */
7551           nterms = ne1[i];
7552           for (j = 0, idx= 0; j < nterms; j++) {
7553              a = ce1[i][idx++];
7554              b = ce1[i][idx++];
7555              c = ce1[i][idx++];
7556              ct = c*t;
7557              p = b + ct;
7558              cp = cos(p);
7559              xyz  += a*t*cp;
7560              xyzd += a*( cp - ct*sin(p) );
7561           }
7562 
7563        /* Sun to Earth, T^2 terms. */
7564           nterms = ne2[i];
7565           for (j = 0, idx = 0; j < nterms; j++) {
7566              a = ce2[i][idx++];
7567              b = ce2[i][idx++];
7568              c = ce2[i][idx++];
7569              ct = c*t;
7570              p = b + ct;
7571              cp = cos(p);
7572              xyz  += a*t2*cp;
7573              xyzd += a*t*( 2.0*cp - ct*sin(p) );
7574           }
7575 
7576        /* Heliocentric Earth position and velocity component. */
7577           ph[i] = xyz;
7578           vh[i] = xyzd / DJY;
7579 
7580        /* ------------------------------------------------ */
7581        /* Obtain component of SSB to Earth ecliptic vector */
7582        /* ------------------------------------------------ */
7583 
7584        /* SSB to Sun, T^0 terms. */
7585           nterms = ns0[i];
7586           for (j = 0, idx = 0; j < nterms; j++) {
7587              a = cs0[i][idx++];
7588              b = cs0[i][idx++];
7589              c = cs0[i][idx++];
7590              p = b + c*t;
7591              xyz  += a*cos(p);
7592              xyzd -= a*c*sin(p);
7593           }
7594 
7595        /* SSB to Sun, T^1 terms. */
7596           nterms = ns1[i];
7597           for (j = 0, idx = 0; j < nterms; j++) {
7598              a = cs1[i][idx++];
7599              b = cs1[i][idx++];
7600              c = cs1[i][idx++];
7601              ct = c*t;
7602              p = b + ct;
7603              cp = cos(p);
7604              xyz  += a*t*cp;
7605              xyzd += a*(cp - ct*sin(p));
7606           }
7607 
7608        /* SSB to Sun, T^2 terms. */
7609           nterms = ns2[i];
7610           for (j = 0, idx = 0; j < nterms; j++) {
7611              a = cs2[i][idx++];
7612              b = cs2[i][idx++];
7613              c = cs2[i][idx++];
7614              ct = c*t;
7615              p = b + ct;
7616              cp = cos(p);
7617              xyz  += a*t2*cp;
7618              xyzd += a*t*(2.0*cp - ct*sin(p));
7619          }
7620 
7621        /* Barycentric Earth position and velocity component. */
7622          pb[i] = xyz;
7623          vb[i] = xyzd / DJY;
7624 
7625        /* Next Cartesian component. */
7626        }
7627 
7628     /* Rotate from ecliptic to BCRS coordinates. */
7629 
7630        x = ph[0];
7631        y = ph[1];
7632        z = ph[2];
7633        pvh[0][0] =      x + am12*y + am13*z;
7634        pvh[0][1] = am21*x + am22*y + am23*z;
7635        pvh[0][2] =          am32*y + am33*z;
7636 
7637        x = vh[0];
7638        y = vh[1];
7639        z = vh[2];
7640        pvh[1][0] =      x + am12*y + am13*z;
7641        pvh[1][1] = am21*x + am22*y + am23*z;
7642        pvh[1][2] =          am32*y + am33*z;
7643 
7644        x = pb[0];
7645        y = pb[1];
7646        z = pb[2];
7647        pvb[0][0] =      x + am12*y + am13*z;
7648        pvb[0][1] = am21*x + am22*y + am23*z;
7649        pvb[0][2] =          am32*y + am33*z;
7650 
7651        x = vb[0];
7652        y = vb[1];
7653        z = vb[2];
7654        pvb[1][0] =      x + am12*y + am13*z;
7655        pvb[1][1] = am21*x + am22*y + am23*z;
7656        pvb[1][2] =          am32*y + am33*z;
7657 
7658     /* Return the status. */
7659        return jstat;
7660 
7661         }
7662     
7663 
7664     /**
7665     *  Equation of the equinoxes, IAU 1994 model.
7666     *
7667     *<p>This function is derived from the International Astronomical Union's
7668     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7669     *
7670     *<p>Status:  canonical model.
7671     *
7672     *<!-- Given: -->
7673     *     @param date1 double      TDB date (Note 1)
7674     *     @param date2 double      TDB date (Note 1) 
7675     *
7676     * <!-- Returned (function value): -->
7677     *  @return double     equation of the equinoxes (Note 2)
7678     *
7679     * <p>Notes:
7680     * <ol>
7681     *
7682     * <li> The date date1+date2 is a Julian Date, apportioned in any
7683     *     convenient way between the two arguments.  For example,
7684     *     JD(TT)=2450123.7 could be expressed in any of these ways,
7685     *     among others:
7686     *<pre>
7687     *            date1          date2
7688     *
7689     *         2450123.7           0.0       (JD method)
7690     *         2451545.0       -1421.3       (J2000 method)
7691     *         2400000.5       50123.2       (MJD method)
7692     *         2450123.5           0.2       (date &amp; time method)
7693     *</pre>
7694     *     The JD method is the most natural and convenient to use in
7695     *     cases where the loss of several decimal digits of resolution
7696     *     is acceptable.  The J2000 method is best matched to the way
7697     *     the argument is handled internally and will deliver the
7698     *     optimum resolution.  The MJD method and the date &amp; time methods
7699     *     are both good compromises between resolution and convenience.
7700     *
7701     * <li> The result, which is in radians, operates in the following sense:
7702     *
7703     *        Greenwich apparent ST = GMST + equation of the equinoxes
7704     *</ol>
7705     *<p>Called:<ul>
7706     *     <li>{@link #jauNut80} nutation, IAU 1980
7707     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
7708     * </ul>
7709     *<p>References:
7710     *
7711     *     <p>IAU Resolution C7, Recommendation 3 (1994).
7712     *
7713     *     <p>Capitaine, N. &amp; Gontier, A.-M., 1993, Astron. Astrophys., 275,
7714     *     645-650.
7715     *
7716     *@version 2008 May 24
7717     *
7718     *  @since Release 20101201
7719     *
7720     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7721     */
7722     public static double jauEqeq94(double date1, double date2)
7723     {
7724        double t,  om,  eps0, ee;
7725 
7726 
7727     /* Interval between fundamental epoch J2000.0 and given date (JC). */
7728        t = ((date1 - DJ00) + date2) / DJC;
7729 
7730     /* Longitude of the mean ascending node of the lunar orbit on the */
7731     /* ecliptic, measured from the mean equinox of date. */
7732        om = jauAnpm((450160.280 + (-482890.539
7733                + (7.455 + 0.008 * t) * t) * t) * DAS2R
7734                + fmod(-5.0 * t, 1.0) * D2PI);
7735 
7736     /* Nutation components and mean obliquity. */
7737        NutationTerms nt = jauNut80(date1, date2);
7738        eps0 = jauObl80(date1, date2);
7739 
7740     /* Equation of the equinoxes. */
7741        ee = nt.dpsi*cos(eps0) + DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om));
7742 
7743        return ee;
7744 
7745         }
7746     
7747 
7748     /**
7749     *  Earth rotation angle (IAU 2000 model).
7750     *
7751     *<p>This function is derived from the International Astronomical Union's
7752     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7753     *
7754     *<p>Status:  canonical model.
7755     *
7756     *<!-- Given: -->
7757     *     @param dj1 double     UT1 as a 2-part Julian Date (see note)
7758     *     @param dj2 double     UT1 as a 2-part Julian Date (see note) 
7759     *
7760     * <!-- Returned (function value): -->
7761     *  @return double    Earth rotation angle (radians), range 0-2pi
7762     *
7763     * <p>Notes:
7764     * <ol>
7765     *
7766     * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
7767     *     convenient way between the arguments dj1 and dj2.  For example,
7768     *     JD(UT1)=2450123.7 could be expressed in any of these ways,
7769     *     among others:
7770     *<pre>
7771     *             dj1            dj2
7772     *
7773     *         2450123.7           0.0       (JD method)
7774     *         2451545.0       -1421.3       (J2000 method)
7775     *         2400000.5       50123.2       (MJD method)
7776     *         2450123.5           0.2       (date &amp; time method)
7777     *</pre>
7778     *     The JD method is the most natural and convenient to use in
7779     *     cases where the loss of several decimal digits of resolution
7780     *     is acceptable.  The J2000 and MJD methods are good compromises
7781     *     between resolution and convenience.  The date &amp; time method is
7782     *     best matched to the algorithm used:  maximum precision is
7783     *     delivered when the dj1 argument is for 0hrs UT1 on the day in
7784     *     question and the dj2 argument lies in the range 0 to 1, or vice
7785     *     versa.
7786     *
7787     * <li> The algorithm is adapted from Expression 22 of Capitaine et al.
7788     *     2000.  The time argument has been expressed in days directly,
7789     *     and, to retain precision, integer contributions have been
7790     *     eliminated.  The same formulation is given in IERS Conventions
7791     *     (2003), Chap. 5, Eq. 14.
7792     *</ol>
7793     *<p>Called:<ul>
7794     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
7795     * </ul>
7796     *<p>References:
7797     *
7798     *     <p>Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron.
7799     *     Astrophys., 355, 398-405.
7800     *
7801     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7802     *     IERS Technical Note No. 32, BKG (2004)
7803     *
7804     *@version 2008 May 24
7805     *
7806     *  @since Release 20101201
7807     *
7808     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7809     */
7810     public static double jauEra00(double dj1, double dj2)
7811     {
7812        double d1, d2, t, f, theta;
7813 
7814 
7815     /* Days since fundamental epoch. */
7816        if (dj1 < dj2) {
7817           d1 = dj1;
7818           d2 = dj2;
7819        } else {
7820           d1 = dj2;
7821           d2 = dj1;
7822        }
7823        t = d1 + (d2- DJ00);
7824 
7825     /* Fractional part of T (days). */
7826        f = fmod(d1, 1.0) + fmod(d2, 1.0);
7827 
7828     /* Earth rotation angle at this UT1. */
7829        theta = jauAnp(D2PI * (f + 0.7790572732640
7830                                 + 0.00273781191135448 * t));
7831 
7832        return theta;
7833 
7834         }
7835     
7836 
7837     /**
7838     *  Fundamental argument, IERS Conventions (2003):
7839     *  mean elongation of the Moon from the Sun.
7840     *
7841     *<p>This function is derived from the International Astronomical Union's
7842     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7843     *
7844     *<p>Status:  canonical model.
7845     *
7846     *<!-- Given: -->
7847     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7848     *
7849     * <!-- Returned (function value): -->
7850     *  @return double    D, radians (Note 2)
7851     *
7852     * <p>Notes:
7853     * <ol>
7854     *
7855     * <li> Though t is strictly TDB, it is usually more convenient to use
7856     *     TT, which makes no significant difference.
7857     *
7858     * <li> The expression used is as adopted in IERS Conventions (2003) and
7859     *     is from Simon et al. (1994).
7860     *</ol>
7861     *<p>References:
7862     *
7863     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7864     *     IERS Technical Note No. 32, BKG (2004)
7865     *
7866     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7867     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7868     *
7869     *@version 2009 December 16
7870     *
7871     *  @since Release 20101201
7872     *
7873     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7874     */
7875     public static double jauFad03(double t)
7876     {
7877        double a;
7878 
7879 
7880     /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */
7881        a = fmod(          1072260.703692 +
7882                  t * ( 1602961601.2090 +
7883                  t * (        - 6.3706 +
7884                  t * (          0.006593 +
7885                  t * (        - 0.00003169 ) ) ) ), TURNAS ) * DAS2R;
7886 
7887        return a;
7888 
7889         }
7890     
7891 
7892     /**
7893     *  Fundamental argument, IERS Conventions (2003):
7894     *  mean longitude of Earth.
7895     *
7896     *<p>This function is derived from the International Astronomical Union's
7897     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7898     *
7899     *<p>Status:  canonical model.
7900     *
7901     *<!-- Given: -->
7902     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7903     *
7904     * <!-- Returned (function value): -->
7905     *  @return double    mean longitude of Earth, radians (Note 2)
7906     *
7907     * <p>Notes:
7908     * <ol>
7909     *
7910     * <li> Though t is strictly TDB, it is usually more convenient to use
7911     *     TT, which makes no significant difference.
7912     *
7913     * <li> The expression used is as adopted in IERS Conventions (2003) and
7914     *     comes from Souchay et al. (1999) after Simon et al. (1994).
7915     *</ol>
7916     *<p>References:
7917     *
7918     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7919     *     IERS Technical Note No. 32, BKG (2004)
7920     *
7921     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7922     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7923     *
7924     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
7925     *     Astron.Astrophys.Supp.Ser. 135, 111
7926     *
7927     *@version 2009 December 16
7928     *
7929     *  @since Release 20101201
7930     *
7931     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7932     */
7933     public static double jauFae03(double t)
7934     {
7935        double a;
7936 
7937 
7938     /* Mean longitude of Earth (IERS Conventions 2003). */
7939        a = fmod(1.753470314 + 628.3075849991 * t, D2PI);
7940 
7941        return a;
7942 
7943         }
7944     
7945 
7946     /**
7947     *  Fundamental argument, IERS Conventions (2003):
7948     *  mean longitude of the Moon minus mean longitude of the ascending
7949     *  node.
7950     *
7951     *<p>This function is derived from the International Astronomical Union's
7952     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7953     *
7954     *<p>Status:  canonical model.
7955     *
7956     *<!-- Given: -->
7957     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7958     *
7959     * <!-- Returned (function value): -->
7960     *  @return double    F, radians (Note 2)
7961     *
7962     * <p>Notes:
7963     * <ol>
7964     *
7965     * <li> Though t is strictly TDB, it is usually more convenient to use
7966     *     TT, which makes no significant difference.
7967     *
7968     * <li> The expression used is as adopted in IERS Conventions (2003) and
7969     *     is from Simon et al. (1994).
7970     *</ol>
7971     *<p>References:
7972     *
7973     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7974     *     IERS Technical Note No. 32, BKG (2004)
7975     *
7976     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7977     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7978     *
7979     *@version 2009 December 16
7980     *
7981     *  @since Release 20101201
7982     *
7983     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7984     */
7985     public static double jauFaf03(double t)
7986     {
7987        double a;
7988 
7989 
7990     /* Mean longitude of the Moon minus that of the ascending node */
7991     /* (IERS Conventions 2003).                                    */
7992        a = fmod(           335779.526232 +
7993                  t * ( 1739527262.8478 +
7994                  t * (       - 12.7512 +
7995                  t * (        - 0.001037 +
7996                  t * (          0.00000417 ) ) ) ), TURNAS ) * DAS2R;
7997 
7998        return a;
7999 
8000 
8001         }
8002     
8003 
8004     /**
8005     *  Fundamental argument, IERS Conventions (2003):
8006     *  mean longitude of Jupiter.
8007     *
8008     *<p>This function is derived from the International Astronomical Union's
8009     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8010     *
8011     *<p>Status:  canonical model.
8012     *
8013     *<!-- Given: -->
8014     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8015     *
8016     * <!-- Returned (function value): -->
8017     *  @return double    mean longitude of Jupiter, radians (Note 2)
8018     *
8019     * <p>Notes:
8020     * <ol>
8021     *
8022     * <li> Though t is strictly TDB, it is usually more convenient to use
8023     *     TT, which makes no significant difference.
8024     *
8025     * <li> The expression used is as adopted in IERS Conventions (2003) and
8026     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8027     *</ol>
8028     *<p>References:
8029     *
8030     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8031     *     IERS Technical Note No. 32, BKG (2004)
8032     *
8033     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8034     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8035     *
8036     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8037     *     Astron.Astrophys.Supp.Ser. 135, 111
8038     *
8039     *@version 2009 December 16
8040     *
8041     *  @since Release 20101201
8042     *
8043     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8044     */
8045     public static double jauFaju03(double t)
8046     {
8047        double a;
8048 
8049 
8050     /* Mean longitude of Jupiter (IERS Conventions 2003). */
8051        a = fmod(0.599546497 + 52.9690962641 * t, D2PI);
8052 
8053        return a;
8054 
8055         }
8056     
8057 
8058     /**
8059     *  Fundamental argument, IERS Conventions (2003):
8060     *  mean anomaly of the Moon.
8061     *
8062     *<p>This function is derived from the International Astronomical Union's
8063     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8064     *
8065     *<p>Status:  canonical model.
8066     *
8067     *<!-- Given: -->
8068     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8069     *
8070     * <!-- Returned (function value): -->
8071     *  @return double    l, radians (Note 2)
8072     *
8073     * <p>Notes:
8074     * <ol>
8075     *
8076     * <li> Though t is strictly TDB, it is usually more convenient to use
8077     *     TT, which makes no significant difference.
8078     *
8079     * <li> The expression used is as adopted in IERS Conventions (2003) and
8080     *     is from Simon et al. (1994).
8081     *</ol>
8082     *<p>References:
8083     *
8084     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8085     *     IERS Technical Note No. 32, BKG (2004)
8086     *
8087     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8088     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8089     *
8090     *@version 2009 December 16
8091     *
8092     *  @since Release 20101201
8093     *
8094     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8095     */
8096     public static double jauFal03(double t)
8097     {
8098        double a;
8099 
8100 
8101     /* Mean anomaly of the Moon (IERS Conventions 2003). */
8102        a = fmod(           485868.249036  +
8103                  t * ( 1717915923.2178 +
8104                  t * (         31.8792 +
8105                  t * (          0.051635 +
8106                  t * (        - 0.00024470 ) ) ) ), TURNAS ) * DAS2R;
8107 
8108        return a;
8109 
8110         }
8111     
8112 
8113     /**
8114     *  Fundamental argument, IERS Conventions (2003):
8115     *  mean anomaly of the Sun.
8116     *
8117     *<p>This function is derived from the International Astronomical Union's
8118     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8119     *
8120     *<p>Status:  canonical model.
8121     *
8122     *<!-- Given: -->
8123     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8124     *
8125     * <!-- Returned (function value): -->
8126     *  @return double    l', radians (Note 2)
8127     *
8128     * <p>Notes:
8129     * <ol>
8130     *
8131     * <li> Though t is strictly TDB, it is usually more convenient to use
8132     *     TT, which makes no significant difference.
8133     *
8134     * <li> The expression used is as adopted in IERS Conventions (2003) and
8135     *     is from Simon et al. (1994).
8136     *</ol>
8137     *<p>References:
8138     *
8139     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8140     *     IERS Technical Note No. 32, BKG (2004)
8141     *
8142     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8143     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8144     *
8145     *@version 2009 December 16
8146     *
8147     *  @since Release 20101201
8148     *
8149     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8150     */
8151     public static double jauFalp03(double t)
8152     {
8153        double a;
8154 
8155 
8156     /* Mean anomaly of the Sun (IERS Conventions 2003). */
8157        a = fmod(         1287104.793048 +
8158                  t * ( 129596581.0481 +
8159                  t * (       - 0.5532 +
8160                  t * (         0.000136 +
8161                  t * (       - 0.00001149 ) ) ) ), TURNAS ) * DAS2R;
8162 
8163        return a;
8164 
8165         }
8166     
8167 
8168     /**
8169     *  Fundamental argument, IERS Conventions (2003):
8170     *  mean longitude of Mars.
8171     *
8172     *<p>This function is derived from the International Astronomical Union's
8173     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8174     *
8175     *<p>Status:  canonical model.
8176     *
8177     *<!-- Given: -->
8178     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8179     *
8180     * <!-- Returned (function value): -->
8181     *  @return double    mean longitude of Mars, radians (Note 2)
8182     *
8183     * <p>Notes:
8184     * <ol>
8185     *
8186     * <li> Though t is strictly TDB, it is usually more convenient to use
8187     *     TT, which makes no significant difference.
8188     *
8189     * <li> The expression used is as adopted in IERS Conventions (2003) and
8190     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8191     *</ol>
8192     *<p>References:
8193     *
8194     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8195     *     IERS Technical Note No. 32, BKG (2004)
8196     *
8197     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8198     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8199     *
8200     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8201     *     Astron.Astrophys.Supp.Ser. 135, 111
8202     *
8203     *@version 2009 December 16
8204     *
8205     *  @since Release 20101201
8206     *
8207     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8208     */
8209     public static double jauFama03(double t)
8210     {
8211        double a;
8212 
8213 
8214     /* Mean longitude of Mars (IERS Conventions 2003). */
8215        a = fmod(6.203480913 + 334.0612426700 * t, D2PI);
8216 
8217        return a;
8218 
8219         }
8220     
8221 
8222     /**
8223     *  Fundamental argument, IERS Conventions (2003):
8224     *  mean longitude of Mercury.
8225     *
8226     *<p>This function is derived from the International Astronomical Union's
8227     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8228     *
8229     *<p>Status:  canonical model.
8230     *
8231     *<!-- Given: -->
8232     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8233     *
8234     * <!-- Returned (function value): -->
8235     *  @return double    mean longitude of Mercury, radians (Note 2)
8236     *
8237     * <p>Notes:
8238     * <ol>
8239     *
8240     * <li> Though t is strictly TDB, it is usually more convenient to use
8241     *     TT, which makes no significant difference.
8242     *
8243     * <li> The expression used is as adopted in IERS Conventions (2003) and
8244     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8245     *</ol>
8246     *<p>References:
8247     *
8248     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8249     *     IERS Technical Note No. 32, BKG (2004)
8250     *
8251     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8252     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8253     *
8254     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8255     *     Astron.Astrophys.Supp.Ser. 135, 111
8256     *
8257     *@version 2009 December 16
8258     *
8259     *  @since Release 20101201
8260     *
8261     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8262     */
8263     public static double jauFame03(double t)
8264     {
8265        double a;
8266 
8267 
8268     /* Mean longitude of Mercury (IERS Conventions 2003). */
8269        a = fmod(4.402608842 + 2608.7903141574 * t, D2PI);
8270 
8271        return a;
8272 
8273         }
8274     
8275 
8276 
8277     /**
8278     *  Fundamental argument, IERS Conventions (2003):
8279     *  mean longitude of Neptune.
8280     *
8281     *<p>This function is derived from the International Astronomical Union's
8282     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8283     *
8284     *<p>Status:  canonical model.
8285     *
8286     *<!-- Given: -->
8287     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8288     *
8289     * <!-- Returned (function value): -->
8290     *  @return double    mean longitude of Neptune, radians (Note 2)
8291     *
8292     * <p>Notes:
8293     * <ol>
8294     *
8295     * <li> Though t is strictly TDB, it is usually more convenient to use
8296     *     TT, which makes no significant difference.
8297     *
8298     * <li> The expression used is as adopted in IERS Conventions (2003) and
8299     *     is adapted from Simon et al. (1994).
8300     *</ol>
8301     *<p>References:
8302     *
8303     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8304     *     IERS Technical Note No. 32, BKG (2004)
8305     *
8306     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8307     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8308     *
8309     *@version 2009 December 16
8310     *
8311     *  @since Release 20101201
8312     *
8313     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8314     */
8315     public static double jauFane03(double t)
8316     {
8317        double a;
8318 
8319 
8320     /* Mean longitude of Neptune (IERS Conventions 2003). */
8321        a = fmod(5.311886287 + 3.8133035638 * t, D2PI);
8322 
8323        return a;
8324 
8325         }
8326     
8327 
8328     /**
8329     *  Fundamental argument, IERS Conventions (2003):
8330     *  mean longitude of the Moon's ascending node.
8331     *
8332     *<p>This function is derived from the International Astronomical Union's
8333     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8334     *
8335     *<p>Status:  canonical model.
8336     *
8337     *<!-- Given: -->
8338     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8339     *
8340     * <!-- Returned (function value): -->
8341     *  @return double    Omega, radians (Note 2)
8342     *
8343     * <p>Notes:
8344     * <ol>
8345     *
8346     * <li> Though t is strictly TDB, it is usually more convenient to use
8347     *     TT, which makes no significant difference.
8348     *
8349     * <li> The expression used is as adopted in IERS Conventions (2003) and
8350     *     is from Simon et al. (1994).
8351     *</ol>
8352     *<p>References:
8353     *
8354     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8355     *     IERS Technical Note No. 32, BKG (2004)
8356     *
8357     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8358     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8359     *
8360     *@version 2009 December 16
8361     *
8362     *  @since Release 20101201
8363     *
8364     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8365     */
8366     public static double jauFaom03(double t)
8367     {
8368        double a;
8369 
8370 
8371     /* Mean longitude of the Moon's ascending node */
8372     /* (IERS Conventions 2003).                    */
8373        a = fmod(          450160.398036 +
8374                  t * ( - 6962890.5431 +
8375                  t * (         7.4722 +
8376                  t * (         0.007702 +
8377                  t * (       - 0.00005939 ) ) ) ), TURNAS ) * DAS2R;
8378 
8379        return a;
8380 
8381         }
8382     
8383 
8384     /**
8385     *  Fundamental argument, IERS Conventions (2003):
8386     *  general accumulated precession in longitude.
8387     *
8388     *<p>This function is derived from the International Astronomical Union's
8389     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8390     *
8391     *<p>Status:  canonical model.
8392     *
8393     *<!-- Given: -->
8394     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8395     *
8396     * <!-- Returned (function value): -->
8397     *  @return double    general precession in longitude, radians (Note 2)
8398     *
8399     * <p>Notes:
8400     * <ol>
8401     *
8402     * <li> Though t is strictly TDB, it is usually more convenient to use
8403     *     TT, which makes no significant difference.
8404     *
8405     * <li> The expression used is as adopted in IERS Conventions (2003).  It
8406     *     is taken from Kinoshita &amp; Souchay (1990) and comes originally
8407     *     from Lieske et al. (1977).
8408     *</ol>
8409     *<p>References:
8410     *
8411     *     Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron.
8412     *     48, 187
8413     *
8414     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
8415     *     Astron.Astrophys. 58, 1-16
8416     *
8417     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8418     *     IERS Technical Note No. 32, BKG (2004)
8419     *
8420     *@version 2009 December 16
8421     *
8422     *  @since Release 20101201
8423     *
8424     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8425     */
8426     public static double jauFapa03(double t)
8427     {
8428        double a;
8429 
8430 
8431     /* General accumulated precession in longitude. */
8432        a = (0.024381750 + 0.00000538691 * t) * t;
8433 
8434        return a;
8435 
8436         }
8437     
8438 
8439     /**
8440     *  Fundamental argument, IERS Conventions (2003):
8441     *  mean longitude of Saturn.
8442     *
8443     *<p>This function is derived from the International Astronomical Union's
8444     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8445     *
8446     *<p>Status:  canonical model.
8447     *
8448     *<!-- Given: -->
8449     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8450     *
8451     * <!-- Returned (function value): -->
8452     *  @return double    mean longitude of Saturn, radians (Note 2)
8453     *
8454     * <p>Notes:
8455     * <ol>
8456     *
8457     * <li> Though t is strictly TDB, it is usually more convenient to use
8458     *     TT, which makes no significant difference.
8459     *
8460     * <li> The expression used is as adopted in IERS Conventions (2003) and
8461     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8462     *</ol>
8463     *<p>References:
8464     *
8465     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8466     *     IERS Technical Note No. 32, BKG (2004)
8467     *
8468     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8469     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8470     *
8471     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8472     *     Astron.Astrophys.Supp.Ser. 135, 111
8473     *
8474     *@version 2009 December 16
8475     *
8476     *  @since Release 20101201
8477     *
8478     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8479     */
8480     public static double jauFasa03(double t)
8481     {
8482        double a;
8483 
8484 
8485     /* Mean longitude of Saturn (IERS Conventions 2003). */
8486        a = fmod(0.874016757 + 21.3299104960 * t, D2PI);
8487 
8488        return a;
8489 
8490         }
8491     
8492 
8493     /**
8494     *  Fundamental argument, IERS Conventions (2003):
8495     *  mean longitude of Uranus.
8496     *
8497     *<p>This function is derived from the International Astronomical Union's
8498     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8499     *
8500     *<p>Status:  canonical model.
8501     *
8502     *<!-- Given: -->
8503     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8504     *
8505     *  Returned  (function value):
8506     *           double    mean longitude of Uranus, radians (Note 2)
8507     *
8508     * <p>Notes:
8509     * <ol>
8510     *
8511     * <li> Though t is strictly TDB, it is usually more convenient to use
8512     *     TT, which makes no significant difference.
8513     *
8514     * <li> The expression used is as adopted in IERS Conventions (2003) and
8515     *     is adapted from Simon et al. (1994).
8516     *</ol>
8517     *<p>References:
8518     *
8519     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8520     *     IERS Technical Note No. 32, BKG (2004)
8521     *
8522     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8523     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8524     *
8525     *@version 2009 December 16
8526     *
8527     *  @since Release 20101201
8528     *
8529     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8530     */
8531     public static double jauFaur03(double t)
8532     {
8533        double a;
8534 
8535 
8536     /* Mean longitude of Uranus (IERS Conventions 2003). */
8537        a = fmod(5.481293872 + 7.4781598567 * t, D2PI);
8538 
8539        return a;
8540 
8541         }
8542     
8543 
8544     /**
8545     *  Fundamental argument, IERS Conventions (2003):
8546     *  mean longitude of Venus.
8547     *
8548     *<p>This function is derived from the International Astronomical Union's
8549     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8550     *
8551     *<p>Status:  canonical model.
8552     *
8553     *<!-- Given: -->
8554     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8555     *
8556     * <!-- Returned (function value): -->
8557     *  @return double    mean longitude of Venus, radians (Note 2)
8558     *
8559     * <p>Notes:
8560     * <ol>
8561     *
8562     * <li> Though t is strictly TDB, it is usually more convenient to use
8563     *     TT, which makes no significant difference.
8564     *
8565     * <li> The expression used is as adopted in IERS Conventions (2003) and
8566     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8567     *</ol>
8568     *<p>References:
8569     *
8570     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8571     *     IERS Technical Note No. 32, BKG (2004)
8572     *
8573     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8574     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8575     *
8576     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8577     *     Astron.Astrophys.Supp.Ser. 135, 111
8578     *
8579     *@version 2009 December 16
8580     *
8581     *  @since Release 20101201
8582     *
8583     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8584     */
8585     public static double jauFave03(double t)
8586     {
8587        double a;
8588 
8589 
8590     /* Mean longitude of Venus (IERS Conventions 2003). */
8591        a = fmod(3.176146697 + 1021.3285546211 * t, D2PI);
8592 
8593        return a;
8594 
8595         }
8596     
8597 
8598     /**
8599     *  Transform FK5 (J2000.0) star data into the Hipparcos system.
8600     *
8601     *<p>This function is derived from the International Astronomical Union's
8602     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8603     *
8604     *<p>Status:  support function.
8605     *
8606     *  Given (all FK5, equinox J2000.0, epoch J2000.0):
8607     *     r5      double    RA (radians)
8608     *     d5      double    Dec (radians)
8609     *     dr5     double    proper motion in RA (dRA/dt, rad/Jyear)
8610     *     dd5     double    proper motion in Dec (dDec/dt, rad/Jyear)
8611     *     px5     double    parallax (arcsec)
8612     *     rv5     double    radial velocity (km/s, positive = receding)
8613     *
8614     *  Returned (all Hipparcos, epoch J2000.0):
8615     *     rh      double    RA (radians)
8616     *     dh      double    Dec (radians)
8617     *     drh     double    proper motion in RA (dRA/dt, rad/Jyear)
8618     *     ddh     double    proper motion in Dec (dDec/dt, rad/Jyear)
8619     *     pxh     double    parallax (arcsec)
8620     *     rvh     double    radial velocity (km/s, positive = receding)
8621     *
8622     * <p>Notes:
8623     * <ol>
8624     *
8625     * <li> This function transforms FK5 star positions and proper motions
8626     *     into the system of the Hipparcos catalog.
8627     *
8628     * <li> The proper motions in RA are dRA/dt rather than
8629     *     cos(Dec)*dRA/dt, and are per year rather than per century.
8630     *
8631     * <li> The FK5 to Hipparcos transformation is modeled as a pure
8632     *     rotation and spin;  zonal errors in the FK5 catalog are not
8633     *     taken into account.
8634     *
8635     * <li> See also {@link #jauH2fk5}, {@link #jauFk5hz}, {@link #jauHfk5z}.
8636     *</ol>
8637     *<p>Called:<ul>
8638     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
8639     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8640     *     <li>{@link #jauRxp} product of r-matrix and p-vector
8641     *     <li>{@link #jauPxp} vector product of two p-vectors
8642     *     <li>{@link #jauPpp} p-vector plus p-vector
8643     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
8644     * </ul>
8645     *<p>Reference:
8646     *
8647     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8648     *
8649     *@version 2009 December 17
8650     *
8651     *  @since Release 20101201
8652     *
8653     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8654     */
8655     public static CatalogCoords jauFk52h(double r5, double d5,
8656                   double dr5, double dd5, double px5, double rv5)
8657     {
8658        int i;
8659        double pv5[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pvh[][] = new double[2][3];
8660 
8661 
8662     /* FK5 barycentric position/velocity pv-vector (normalized). */
8663        jauStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
8664 
8665     /* FK5 to Hipparcos orientation matrix and spin vector. */
8666        jauFk5hip(r5h, s5h);
8667 
8668     /* Make spin units per day instead of per year. */
8669        for ( i = 0; i < 3; s5h[i++] /= 365.25 );
8670 
8671     /* Orient the FK5 position into the Hipparcos system. */
8672        pvh[0] = jauRxp(r5h, pv5[0]);
8673 
8674     /* Apply spin to the position giving an extra space motion component. */
8675        wxp = jauPxp(pv5[0],s5h);
8676 
8677     /* Add this component to the FK5 space motion. */
8678        vv = jauPpp(wxp, pv5[1]);
8679 
8680     /* Orient the FK5 space motion into the Hipparcos system. */
8681        pvh[1] = jauRxp(r5h, vv);
8682 
8683     /* Hipparcos pv-vector to spherical. */
8684        CatalogCoords cat = null;
8685        try {
8686            cat = jauPvstar(pvh);
8687        } catch (JSOFAInternalError e) {
8688            //original code ignored possibility of error too...
8689            e.printStackTrace();
8690        }
8691 
8692        return cat;
8693 
8694         }
8695     
8696 
8697     /**
8698     *  FK5 to Hipparcos rotation and spin.
8699     *
8700     *<p>This function is derived from the International Astronomical Union's
8701     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8702     *
8703     *<p>Status:  support function.
8704     *
8705     *<!-- Returned: -->
8706     *     @param r5h    double[3][3]    <u>returned</u> r-matrix: FK5 rotation wrt Hipparcos (Note 2)
8707     *     @param s5h    double[3]       <u>returned</u> r-vector: FK5 spin wrt Hipparcos (Note 3)
8708     *
8709     * <p>Notes:
8710     * <ol>
8711     *
8712     * <li> This function models the FK5 to Hipparcos transformation as a
8713     *     pure rotation and spin;  zonal errors in the FK5 catalogue are
8714     *     not taken into account.
8715     *
8716     * <li> The r-matrix r5h operates in the sense:
8717     *
8718     *           P_Hipparcos = r5h x P_FK5
8719     *
8720     *     where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is
8721     *     the equivalent Hipparcos p-vector.
8722     *
8723     * <li> The r-vector s5h represents the time derivative of the FK5 to
8724     *     Hipparcos rotation.  The units are radians per year (Julian,
8725     *     TDB).
8726     *</ol>
8727     *<p>Called:<ul>
8728     *     <li>{@link #jauRv2m} r-vector to r-matrix
8729     * </ul>
8730     *<p>Reference:
8731     *
8732     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8733     *
8734     *@version 2009 March 14
8735     *
8736     *  @since Release 20101201
8737     *
8738     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8739     */
8740     public static void jauFk5hip(double r5h[][], double s5h[] )
8741     {
8742        double v[] = new double[3];
8743 
8744     /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */
8745        double epx, epy, epz;
8746        double omx, omy, omz;
8747 
8748 
8749        epx = -19.9e-3 * DAS2R;
8750        epy =  -9.1e-3 * DAS2R;
8751        epz =  22.9e-3 * DAS2R;
8752 
8753        omx = -0.30e-3 * DAS2R;
8754        omy =  0.60e-3 * DAS2R;
8755        omz =  0.70e-3 * DAS2R;
8756 
8757     /* FK5 to Hipparcos orientation expressed as an r-vector. */
8758        v[0] = epx;
8759        v[1] = epy;
8760        v[2] = epz;
8761 
8762     /* Re-express as an r-matrix. */
8763        double[][] r5ht = jauRv2m(v);
8764        jauCr(r5ht, r5h);
8765 
8766     /* Hipparcos wrt FK5 spin expressed as an r-vector. */
8767        s5h[0] = omx;
8768        s5h[1] = omy;
8769        s5h[2] = omz;
8770 
8771        return;
8772 
8773         }
8774     
8775   /**
8776   * Position consisting of (&alpha;, &delta;) pairs in radians. Where &alpha; is right ascension (or longitude angle) and &delta; is declination (or latitude angle).
8777  * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
8778  * 
8779  * @since AIDA Stage 1
8780  * @TODO needs better name cf {@link SphericalPosition}
8781  */
8782 public static class SphericalCoordinate {
8783       public double alpha;
8784       public double delta;
8785       public SphericalCoordinate(double alpha, double delta){
8786           this.alpha = alpha;
8787           this.delta = delta;
8788       }
8789   }
8790 
8791 /**
8792  * Spherical coordinate with equation of origins .
8793  * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
8794  * @version $Revision$ $date$
8795  */
8796 public static class SphericalCoordinateEO {
8797     public SphericalCoordinate pos;
8798     public double eo;
8799     /**
8800      * @param pos
8801      * @param eo
8802      */
8803     public SphericalCoordinateEO(SphericalCoordinate pos, double eo) {
8804         this.pos = pos;
8805         this.eo = eo;
8806     }
8807     
8808     
8809 }
8810     /**
8811     *  Transform an FK5 (J2000.0) star position into the system of the
8812     *  Hipparcos catalogue, assuming zero Hipparcos proper motion.
8813     *
8814     *<p>This function is derived from the International Astronomical Union's
8815     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8816     *
8817     *<p>Status:  support function.
8818     *
8819     *<!-- Given: -->
8820     *     @param r5            double    FK5 RA (radians), equinox J2000.0, at date
8821     *     @param d5            double    FK5 Dec (radians), equinox J2000.0, at date
8822     *     @param date1 double    TDB date (Notes 1,2)
8823     *     @param date2 double    TDB date (Notes 1,2) 
8824     *
8825     *<!-- Returned: -->
8826     *     @return rh            double     <u>returned</u> Hipparcos RA (radians)
8827     *             dh            double     <u>returned</u> Hipparcos Dec (radians)
8828     *
8829     * <p>Notes:
8830     * <ol>
8831     *
8832     * <li> This function converts a star position from the FK5 system to
8833     *     the Hipparcos system, in such a way that the Hipparcos proper
8834     *     motion is zero.  Because such a star has, in general, a non-zero
8835     *     proper motion in the FK5 system, the function requires the date
8836     *     at which the position in the FK5 system was determined.
8837     *
8838     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
8839     *     convenient way between the two arguments.  For example,
8840     *     JD(TT)=2450123.7 could be expressed in any of these ways,
8841     *     among others:
8842     *<pre>
8843     *            date1          date2
8844     *
8845     *         2450123.7           0.0       (JD method)
8846     *         2451545.0       -1421.3       (J2000 method)
8847     *         2400000.5       50123.2       (MJD method)
8848     *         2450123.5           0.2       (date &amp; time method)
8849     *</pre>
8850     *     The JD method is the most natural and convenient to use in
8851     *     cases where the loss of several decimal digits of resolution
8852     *     is acceptable.  The J2000 method is best matched to the way
8853     *     the argument is handled internally and will deliver the
8854     *     optimum resolution.  The MJD method and the date &amp; time methods
8855     *     are both good compromises between resolution and convenience.
8856     *
8857     * <li> The FK5 to Hipparcos transformation is modeled as a pure
8858     *     rotation and spin;  zonal errors in the FK5 catalogue are not
8859     *     taken into account.
8860     *
8861     * <li> The position returned by this function is in the Hipparcos
8862     *     reference system but at date date1+date2.
8863     *
8864     * <li> See also jauFk52h, jauH2fk5, jauHfk5z.
8865     *</ol>
8866     *<p>Called:<ul>
8867     *     <li>{@link #jauS2c} spherical coordinates to unit vector
8868     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8869     *     <li>{@link #jauSxp} multiply p-vector by scalar
8870     *     <li>{@link #jauRv2m} r-vector to r-matrix
8871     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
8872     *     <li>{@link #jauPxp} vector product of two p-vectors
8873     *     <li>{@link #jauC2s} p-vector to spherical
8874     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
8875     * </ul>
8876     *<p>Reference:
8877     *
8878     *     <p>F.Mignard &amp; M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
8879     *
8880     *@version 2009 December 17
8881     *
8882     *  @since Release 20101201
8883     *
8884     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8885     */
8886     public static SphericalCoordinate jauFk5hz(double r5, double d5, double date1, double date2
8887                   )
8888     {
8889        double t, p5e[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], vst[] = new double[3], rst[][] = new double[3][3], p5[] = new double[3],
8890               ph[] = new double[3];
8891 
8892 
8893     /* Interval from given date to fundamental epoch J2000.0 (JY). */
8894        t = - ((date1 - DJ00) + date2) / DJY;
8895 
8896     /* FK5 barycentric position vector. */
8897        p5e = jauS2c(r5,d5);
8898 
8899     /* FK5 to Hipparcos orientation matrix and spin vector. */
8900        jauFk5hip(r5h, s5h);
8901 
8902     /* Accumulated Hipparcos wrt FK5 spin over that interval. */
8903        vst = jauSxp(t,s5h);
8904 
8905     /* Express the accumulated spin as a rotation matrix. */
8906        rst = jauRv2m(vst);
8907 
8908     /* Derotate the vector's FK5 axes back to date. */
8909        p5 = jauTrxp(rst, p5e);
8910 
8911     /* Rotate the vector into the Hipparcos system. */
8912        ph = jauRxp(r5h, p5);
8913 
8914     /* Hipparcos vector to spherical. */
8915        SphericalCoordinate sc = jauC2s(ph);
8916        double rh = jauAnp(sc.alpha);
8917        sc.alpha = rh;
8918        
8919        return sc;
8920 
8921         }
8922     
8923 
8924     /**
8925     *  Form rotation matrix given the Fukushima-Williams angles.
8926     *
8927     *<p>This function is derived from the International Astronomical Union's
8928     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8929     *
8930     *<p>Status:  support function.
8931     *
8932     *<!-- Given: -->
8933     *     @param gamb      double          F-W angle gamma_bar (radians)
8934     *     @param phib      double          F-W angle phi_bar (radians)
8935     *     @param psi       double          F-W angle psi (radians)
8936     *     @param eps       double          F-W angle epsilon (radians)
8937     *
8938     *<!-- Returned: -->
8939     *     @return r         double[3][3]     <u>returned</u> rotation matrix
8940     *
8941     * <p>Notes:
8942     * <ol>
8943     *
8944     * <li> Naming the following points:
8945     *
8946     *           e = J2000.0 ecliptic pole,
8947     *           p = GCRS pole,
8948     *           E = ecliptic pole of date,
8949     *     and   P = CIP,
8950     *
8951     *     the four Fukushima-Williams angles are as follows:
8952     *
8953     *        gamb = gamma = epE
8954     *        phib = phi = pE
8955     *        psi = psi = pEP
8956     *        eps = epsilon = EP
8957     *
8958     * <li> The matrix representing the combined effects of frame bias,
8959     *     precession and nutation is:
8960     *
8961     *        NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
8962     *
8963     * <li> Three different matrices can be constructed, depending on the
8964     *     supplied angles:
8965     *
8966     *     o  To obtain the nutation x precession x frame bias matrix,
8967     *        generate the four precession angles, generate the nutation
8968     *        components and add them to the psi_bar and epsilon_A angles,
8969     *        and call the present function.
8970     *
8971     *     o  To obtain the precession x frame bias matrix, generate the
8972     *        four precession angles and call the present function.
8973     *
8974     *     o  To obtain the frame bias matrix, generate the four precession
8975     *        angles for date J2000.0 and call the present function.
8976     *
8977     *     The nutation-only and precession-only matrices can if necessary
8978     *     be obtained by combining these three appropriately.
8979     *</ol>
8980     *<p>Called:<ul>
8981     *     <li>{@link #jauIr} initialize r-matrix to identity
8982     *     <li>{@link #jauRz} rotate around Z-axis
8983     *     <li>{@link #jauRx} rotate around X-axis
8984     * </ul>
8985     *<p>Reference:
8986     *
8987     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
8988     *
8989     *@version 2009 December 17
8990     *
8991     *  @since Release 20101201
8992     *
8993     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8994     */
8995     public static double[][] jauFw2m(double gamb, double phib, double psi, double eps)
8996     {
8997     /* Construct the matrix. */
8998        double r[][] = new double[3][3];
8999        jauIr(r);
9000        jauRz(gamb, r);
9001        jauRx(phib, r);
9002        jauRz(-psi, r);
9003        jauRx(-eps, r);
9004 
9005        return r;
9006 
9007         }
9008     
9009 
9010     /**
9011     *  CIP X,Y given Fukushima-Williams bias-precession-nutation angles.
9012     *
9013     *<p>This function is derived from the International Astronomical Union's
9014     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9015     *
9016     *<p>Status:  support function.
9017     *
9018     *<!-- Given: -->
9019     *     @param gamb      double     F-W angle gamma_bar (radians)
9020     *     @param phib      double     F-W angle phi_bar (radians)
9021     *     @param psi       double     F-W angle psi (radians)
9022     *     @param eps       double     F-W angle epsilon (radians)
9023     *
9024     *<!-- Returned: -->
9025     *     @return CIP unit vector X,Y
9026     *
9027     * <p>Notes:
9028     * <ol>
9029     *
9030     * <li> Naming the following points:
9031     *
9032     *           e = J2000.0 ecliptic pole,
9033     *           p = GCRS pole
9034     *           E = ecliptic pole of date,
9035     *     and   P = CIP,
9036     *
9037     *     the four Fukushima-Williams angles are as follows:
9038     *
9039     *        gamb = gamma = epE
9040     *        phib = phi = pE
9041     *        psi = psi = pEP
9042     *        eps = epsilon = EP
9043     *
9044     * <li> The matrix representing the combined effects of frame bias,
9045     *     precession and nutation is:
9046     *
9047     *        NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb)
9048     *
9049     *       The returned values x,y are elements [2][0] and [2][1] of the
9050     *       matrix.  Near J2000.0, they are essentially angles in radians
9051     *       
9052     *     X,Y are elements (3,1) and (3,2) of the matrix.
9053     *</ol>
9054     *<p>Called:<ul>
9055     *     <li>{@link #jauFw2m} F-W angles to r-matrix
9056     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
9057     * </ul>
9058     *<p>Reference:
9059     *
9060     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
9061     *
9062     *@version 2009 December 17
9063     *
9064     *  @since Release 20101201
9065     *
9066     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9067     */
9068     public static CelestialIntermediatePole jauFw2xy(double gamb, double phib, double psi, double eps)
9069     {
9070        double r[][] = new double[3][3];
9071 
9072 
9073     /* Form NxPxB matrix. */
9074        r = jauFw2m(gamb, phib, psi, eps);
9075 
9076     /* Extract CIP X,Y. */
9077        return jauBpn2xy(r);
9078 
9079     }
9080 
9081     /**
9082      * Geodetic coordinates.
9083      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
9084      * 
9085      * @since AIDA Stage 1
9086      */
9087     public static class GeodeticCoord {
9088         /** longitude (radians, east +ve) */
9089         public  double elong;
9090         /** latitude (geodetic, radians) */
9091         public double phi;
9092         /** height above ellipsoid (geodetic) */
9093         public double height;
9094         public GeodeticCoord(double elong, double phi, double height) {
9095             this.elong = elong;
9096             this.phi = phi;
9097             this.height = height;
9098         }
9099 }
9100     /**
9101     *  Transform geocentric coordinates to geodetic using the specified
9102     *  reference ellipsoid.
9103     *
9104     *<p>This function is derived from the International Astronomical Union's
9105     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9106     *
9107     *<p>Status:  canonical transformation.
9108     *
9109     *<!-- Given: -->
9110     *     @param n        int         ellipsoid identifier (Note 1)
9111     *     @param xyz      double[3]   geocentric vector (Note 2)
9112     *
9113     *<!-- Returned: -->
9114     *     @return elong    double       <u>returned</u> longitude (radians, east +ve)
9115     *             phi      double       <u>returned</u> latitude (geodetic, radians, Note 3)
9116     *             height   double       <u>returned</u> height above ellipsoid (geodetic, Notes 2,3)
9117     *
9118     * <!-- Returned (function value): -->
9119     *  @throws JSOFAIllegalParameter
9120     *                          0 = OK
9121     *                         -1 = illegal identifier (Note 3)
9122     *                         -2 = internal error (Note 3)
9123     *
9124     * <p>Notes:
9125     * <ol>
9126     *
9127     * <li> The identifier n is a number that specifies the choice of
9128     *     reference ellipsoid.  The following are supported:
9129     *
9130     *        n   ellipsoid
9131     *
9132     *        1    WGS84
9133     *        2    GRS80
9134     *
9135     *     The number n has no significance outside the JSOFA software.
9136     *
9137     * <li> The geocentric vector (xyz, given) and height (height, returned)
9138     *     are in meters.
9139     *
9140     * <li> An error status -1 means that the identifier n is illegal.  An
9141     *     error status -2 is theoretically impossible.  In all error cases,
9142     *     phi and height are both set to -1e9.
9143     *
9144     * <li> The inverse transformation is performed in the function jauGd2gc.
9145     *</ol>
9146     *<p>Called:<ul>
9147     *     <li>{@link #jauEform} Earth reference ellipsoids
9148     *     <li>{@link #jauGc2gde} geocentric to geodetic transformation, general
9149     * </ul>
9150     *@version 2010 January 18
9151     *
9152     *  @since Release 20101201
9153     *
9154     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9155     */
9156     public static GeodeticCoord jauGc2gd ( int n, double xyz[] ) throws JSOFAIllegalParameter
9157     {
9158       GeodeticCoord gc;
9159 
9160 
9161     /* Obtain reference ellipsoid parameters. */
9162        ReferenceEllipsoid el = jauEform ( n );
9163 
9164     /* If OK, transform x,y,z to longitude, geodetic latitude, height. */
9165        gc = jauGc2gde ( el.a, el.f, xyz);
9166 
9167     /* Return the status. */
9168        return gc;
9169 
9170     
9171     }
9172     
9173    /**
9174     *  Transform geocentric coordinates to geodetic for a reference
9175     *  ellipsoid of specified form.
9176     *
9177     *<p>This function is derived from the International Astronomical Union's
9178     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9179     *
9180     *<p>Status:  support function.
9181     *
9182     *<!-- Given: -->
9183     *     @param a        double      equatorial radius (Notes 2,4)
9184     *     @param f        double      flattening (Note 3)
9185     *     @param xyz      double[3]   geocentric vector (Note 4)
9186     *
9187     *<!-- Returned: -->
9188     *     @return GeodeticCoord   logitude  (radians, east +ve) latitude (geodetic, radians)  height above ellipsoid (geodetic, Note 4)
9189     *
9190     *  @throws JSOFAIllegalParameter 
9191     *            int       status:
9192     *               
9193     *                         -1 = illegal a
9194     *                         -2 = illegal f
9195     *
9196     * <p>Notes:
9197     * <ol>
9198     *
9199     * <li> This function is based on the GCONV2H Fortran subroutine by
9200     *     Toshio Fukushima (see reference).
9201     *
9202     * <li> The equatorial radius, a, can be in any units, but meters is
9203     *     the conventional choice.
9204     *
9205     * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9206     *     i.e. around 1/298.
9207     *
9208     * <li> The equatorial radius, a, and the geocentric vector, xyz,
9209     *     must be given in the same units, and determine the units of
9210     *     the returned height, height.
9211     *
9212     * <li> If an error occurs (status &lt; 0), elong, phi and height are
9213     *     unchanged.
9214     *
9215     * <li> The inverse transformation is performed in the function
9216     *     jauGd2gce.
9217     *
9218     * <li> The transformation for a standard ellipsoid (such as WGS84) can
9219     *     more conveniently be performed by calling jauGc2gd, which uses a
9220     *     numerical code (1 for WGS84) to identify the required A and F
9221     *     values.
9222     *</ol>
9223     *<p>Reference:
9224     *
9225     *     Fukushima, T., "Transformation from Cartesian to geodetic
9226     *     coordinates accelerated by Halley's method", J.Geodesy (2006)
9227     *     79: 689-693
9228     *
9229     *@version 2009 November 2
9230     *
9231     *  @since Release 20101201
9232     *
9233     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9234  * 
9235     */
9236     public static GeodeticCoord jauGc2gde ( double a, double f, double xyz[] ) throws JSOFAIllegalParameter
9237         {
9238        double aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc,
9239                      c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1,
9240                      cc, s12, cc2;
9241 
9242       double  phi, height;
9243     /* ------------- */
9244     /* Preliminaries */
9245     /* ------------- */
9246 
9247     /* Validate ellipsoid parameters. */
9248        if ( f < 0.0 || f >= 1.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9249        if ( a <= 0.0 ) throw new JSOFAIllegalParameter("bad a", -2);
9250 
9251     /* Functions of ellipsoid parameters (with further validation of f). */
9252        aeps2 = a*a * 1e-32;
9253        e2 = (2.0 - f) * f;
9254        e4t = e2*e2 * 1.5;
9255        ec2 = 1.0 - e2;
9256        if ( ec2 <= 0.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9257        ec = sqrt(ec2);
9258        b = a * ec;
9259 
9260     /* Cartesian components. */
9261        x = xyz[0];
9262        y = xyz[1];
9263        z = xyz[2];
9264 
9265     /* Distance from polar axis squared. */
9266        p2 = x*x + y*y;
9267 
9268     /* Longitude. */
9269        double elong = p2 > 0.0 ? atan2(y, x) : 0.0;
9270 
9271     /* Unsigned z-coordinate. */
9272        absz = abs(z);
9273 
9274     /* Proceed unless polar case. */
9275        if ( p2 > aeps2 ) {
9276 
9277        /* Distance from polar axis. */
9278           p = sqrt(p2);
9279 
9280        /* Normalization. */
9281           s0 = absz / a;
9282           pn = p / a;
9283           zc = ec * s0;
9284 
9285        /* Prepare Newton correction factors. */
9286           c0 = ec * pn;
9287           c02 = c0 * c0;
9288           c03 = c02 * c0;
9289           s02 = s0 * s0;
9290           s03 = s02 * s0;
9291           a02 = c02 + s02;
9292           a0 = sqrt(a02);
9293           a03 = a02 * a0;
9294           d0 = zc*a03 + e2*s03;
9295           f0 = pn*a03 - e2*c03;
9296 
9297        /* Prepare Halley correction factor. */
9298           b0 = e4t * s02 * c02 * pn * (a0 - ec);
9299           s1 = d0*f0 - b0*s0;
9300           cc = ec * (f0*f0 - b0*c0);
9301 
9302        /* Evaluate latitude and height. */
9303           phi = atan(s1/cc);
9304           s12 = s1 * s1;
9305           cc2 = cc * cc;
9306           height = (p*cc + absz*s1 - a * sqrt(ec2*s12 + cc2)) /
9307                                                             sqrt(s12 + cc2);
9308        } else {
9309 
9310        /* Exception: pole. */
9311           phi = DPI / 2.0;
9312           height = absz - b;
9313        }
9314 
9315     /* Restore sign of latitude. */
9316        if ( z < 0 ) phi = -phi;
9317 
9318     /* OK status. */
9319        return new GeodeticCoord(elong, phi, height);
9320 
9321     
9322     }
9323     
9324 
9325     /**
9326     *  Transform geodetic coordinates to geocentric using the specified
9327     *  reference ellipsoid.
9328     *
9329     *<p>This function is derived from the International Astronomical Union's
9330     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9331     *
9332     *<p>Status:  canonical transformation.
9333     *
9334     *<!-- Given: -->
9335     *     @param n        int         ellipsoid identifier (Note 1)
9336     *     @param elong    double      longitude (radians, east +ve)
9337     *     @param phi      double      latitude (geodetic, radians, Note 3)
9338     *     @param height   double      height above ellipsoid (geodetic, Notes 2,3)
9339     *
9340     *<!-- Returned: -->
9341     *     @return xyz      double[3]    <u>returned</u> geocentric vector (Note 2)
9342     *
9343     * <!-- Returned (function value): -->
9344     *  @throws JSOFAIllegalParameter
9345     *                         -1 = illegal identifier (Note 3)
9346     *                         -2 = illegal case (Note 3)
9347     *
9348     * <p>Notes:
9349     * <ol>
9350     *
9351     * <li> The identifier n is a number that specifies the choice of
9352     *     reference ellipsoid.  The following are supported:
9353     *
9354     *        n   ellipsoid
9355     *
9356     *        1    WGS84
9357     *        2    GRS80
9358     *
9359     *     The number n has no significance outside the JSOFA software.
9360     *
9361     * <li> The height (height, given) and the geocentric vector (xyz,
9362     *     returned) are in meters.
9363     *
9364     * <li> No validation is performed on the arguments elong, phi and
9365     *     height.  An error status -1 means that the identifier n is
9366     *     illegal.  An error status -2 protects against cases that would
9367     *     lead to arithmetic exceptions.  In all error cases, xyz is set
9368     *     to zeros.
9369     *
9370     * <li> The inverse transformation is performed in the function jauGc2gd.
9371     *</ol>
9372     *<p>Called:<ul>
9373     *     <li>{@link #jauEform} Earth reference ellipsoids
9374     *     <li>{@link #jauGd2gce} geodetic to geocentric transformation, general
9375     *     <li>{@link #jauZp} zero p-vector
9376     * </ul>
9377     *@version 2010 January 18
9378     *
9379     *  @since Release 20101201
9380     *
9381     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9382     */
9383     public static double[] jauGd2gc ( int n, double elong, double phi, double height ) throws JSOFAIllegalParameter, JSOFAInternalError
9384     {
9385 
9386 
9387     /* Obtain reference ellipsoid parameters. */
9388        ReferenceEllipsoid em = jauEform ( n );
9389 
9390     /* If OK, transform longitude, geodetic latitude, height to x,y,z. */
9391       return jauGd2gce ( em.a, em.f, elong, phi, height );
9392   
9393     
9394     }
9395     
9396 
9397     /**
9398     *  Transform geodetic coordinates to geocentric for a reference
9399     *  ellipsoid of specified form.
9400     *
9401     *<p>This function is derived from the International Astronomical Union's
9402     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9403     *
9404     *<p>Status:  support function.
9405     *
9406     *<!-- Given: -->
9407     *     @param a        double      equatorial radius (Notes 1,4)
9408     *     @param f        double      flattening (Notes 2,4)
9409     *     @param elong    double      longitude (radians, east +ve)
9410     *     @param phi      double      latitude (geodetic, radians, Note 4)
9411     *     @param height   double      height above ellipsoid (geodetic, Notes 3,4)
9412     *
9413     *<!-- Returned: -->
9414     *     @return xyz      double[3]    <u>returned</u> geocentric vector (Note 3)
9415     *
9416     * <!-- Returned (function value): -->
9417     *  @throws JSOFAInternalError
9418     *                            0 = OK
9419     *                           -1 = illegal case (Note 4)
9420     * <p>Notes:
9421     * <ol>
9422     *
9423     * <li> The equatorial radius, a, can be in any units, but meters is
9424     *     the conventional choice.
9425     *
9426     * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9427     *     i.e. around 1/298.
9428     *
9429     * <li> The equatorial radius, a, and the height, height, must be
9430     *     given in the same units, and determine the units of the
9431     *     returned geocentric vector, xyz.
9432     *
9433     * <li> No validation is performed on individual arguments.  The error
9434     *     status -1 protects against (unrealistic) cases that would lead
9435     *     to arithmetic exceptions.  If an error occurs, xyz is unchanged.
9436     *
9437     * <li> The inverse transformation is performed in the function
9438     *     jauGc2gde.
9439     *
9440     * <li> The transformation for a standard ellipsoid (such as WGS84) can
9441     *     more conveniently be performed by calling jauGd2gc,  which uses a
9442     *     numerical code (1 for WGS84) to identify the required a and f
9443     *     values.
9444     *</ol>
9445     *<p>References:
9446     *
9447     *     <p>Green, R.M., Spherical Astronomy, Cambridge University Press,
9448     *     (1985) Section 4.5, p96.
9449     *
9450     *     <p>Explanatory Supplement to the Astronomical Almanac,
9451     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
9452     *     Section 4.22, p202.
9453     *
9454     *@version 2009 November 2
9455     *
9456     *  @since Release 20101201
9457     *
9458     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9459     */
9460     public static double[] jauGd2gce ( double a, double f, double elong, double phi,
9461                     double height ) throws JSOFAInternalError
9462     {
9463        double sp, cp, w, d, ac, as, r;
9464        double xyz[] = new double[3];
9465 
9466 
9467     /* Functions of geodetic latitude. */
9468        sp = sin(phi);
9469        cp = cos(phi);
9470        w = 1.0 - f;
9471        w = w * w;
9472        d = cp*cp + w*sp*sp;
9473        if ( d <= 0.0 ) throw new JSOFAInternalError("illegal combination of arguments d< 0", -1);
9474        ac = a / sqrt(d);
9475        as = w * ac;
9476 
9477     /* Geocentric vector. */
9478        r = (ac + height) * cp;
9479        xyz[0] = r * cos(elong);
9480        xyz[1] = r * sin(elong);
9481        xyz[2] = (as + height) * sp;
9482 
9483     /* Success. */
9484        return xyz;
9485 
9486     
9487     }
9488     
9489 
9490     /**
9491     *  Greenwich mean sidereal time (model consistent with IAU 2000
9492     *  resolutions).
9493     *
9494     *<p>This function is derived from the International Astronomical Union's
9495     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9496     *
9497     *<p>Status:  canonical model.
9498     *
9499     *<!-- Given: -->
9500     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9501     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9502     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9503     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9504     *
9505     * <!-- Returned (function value): -->
9506     *  @return double    Greenwich mean sidereal time (radians)
9507     *
9508     * <p>Notes:
9509     * <ol>
9510     *
9511     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9512     *     Julian Dates, apportioned in any convenient way between the
9513     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9514     *     any of these ways, among others:
9515     *<pre>
9516     *            Part A         Part B
9517     *
9518     *         2450123.7           0.0       (JD method)
9519     *         2451545.0       -1421.3       (J2000 method)
9520     *         2400000.5       50123.2       (MJD method)
9521     *         2450123.5           0.2       (date &amp; time method)
9522     *</pre>
9523     *     The JD method is the most natural and convenient to use in
9524     *     cases where the loss of several decimal digits of resolution
9525     *     is acceptable (in the case of UT;  the TT is not at all critical
9526     *     in this respect).  The J2000 and MJD methods are good compromises
9527     *     between resolution and convenience.  For UT, the date &amp; time
9528     *     method is best matched to the algorithm that is used by the Earth
9529     *     Rotation Angle function, called internally:  maximum precision is
9530     *     delivered when the uta argument is for 0hrs UT1 on the day in
9531     *     question and the utb argument lies in the range 0 to 1, or vice
9532     *     versa.
9533     *
9534     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9535     *     and TT to predict the effects of precession.  If UT1 is used for
9536     *     both purposes, errors of order 100 microarcseconds result.
9537     *
9538     * <li> This GMST is compatible with the IAU 2000 resolutions and must be
9539     *     used only in conjunction with other IAU 2000 compatible
9540     *     components such as precession-nutation and equation of the
9541     *     equinoxes.
9542     *
9543     * <li> The result is returned in the range 0 to 2pi.
9544     *
9545     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9546     *     Conventions 2003.
9547     *</ol>
9548     *<p>Called:<ul>
9549     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9550     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9551     * </ul>
9552     *<p>References:
9553     *
9554     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9555     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9556     *     Astrophysics, 406, 1135-1149 (2003)
9557     *
9558     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9559     *     IERS Technical Note No. 32, BKG (2004)
9560     *
9561     *@version 2009 March 16
9562     *
9563     *  @since Release 20101201
9564     *
9565     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9566     */
9567     public static double jauGmst00(double uta, double utb, double tta, double ttb)
9568     {
9569        double t, gmst;
9570 
9571 
9572     /* TT Julian centuries since J2000.0. */
9573        t = ((tta - DJ00) + ttb) / DJC;
9574 
9575     /* Greenwich Mean Sidereal Time, IAU 2000. */
9576        gmst = jauAnp(jauEra00(uta, utb) +
9577                        (     0.014506   +
9578                        (  4612.15739966 +
9579                        (     1.39667721 +
9580                        (    -0.00009344 +
9581                        (     0.00001882 )
9582               * t) * t) * t) * t) * DAS2R);
9583 
9584        return gmst;
9585 
9586         }
9587     
9588 
9589     /**
9590     *  Greenwich mean sidereal time (consistent with IAU 2006 precession).
9591     *
9592     *<p>This function is derived from the International Astronomical Union's
9593     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9594     *
9595     *<p>Status:  canonical model.
9596     *
9597     *<!-- Given: -->
9598     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9599     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9600     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9601     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9602     *
9603     * <!-- Returned (function value): -->
9604     *  @return double    Greenwich mean sidereal time (radians)
9605     *
9606     * <p>Notes:
9607     * <ol>
9608     *
9609     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9610     *     Julian Dates, apportioned in any convenient way between the
9611     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9612     *     any of these ways, among others:
9613     *<pre>
9614     *            Part A        Part B
9615     *
9616     *         2450123.7           0.0       (JD method)
9617     *         2451545.0       -1421.3       (J2000 method)
9618     *         2400000.5       50123.2       (MJD method)
9619     *         2450123.5           0.2       (date &amp; time method)
9620     *</pre>
9621     *     The JD method is the most natural and convenient to use in
9622     *     cases where the loss of several decimal digits of resolution
9623     *     is acceptable (in the case of UT;  the TT is not at all critical
9624     *     in this respect).  The J2000 and MJD methods are good compromises
9625     *     between resolution and convenience.  For UT, the date &amp; time
9626     *     method is best matched to the algorithm that is used by the Earth
9627     *     rotation angle function, called internally:  maximum precision is
9628     *     delivered when the uta argument is for 0hrs UT1 on the day in
9629     *     question and the utb argument lies in the range 0 to 1, or vice
9630     *     versa.
9631     *
9632     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9633     *     and TT to predict the effects of precession.  If UT1 is used for
9634     *     both purposes, errors of order 100 microarcseconds result.
9635     *
9636     * <li> This GMST is compatible with the IAU 2006 precession and must not
9637     *     be used with other precession models.
9638     *
9639     * <li> The result is returned in the range 0 to 2pi.
9640     *</ol>
9641     *<p>Called:<ul>
9642     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9643     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9644     * </ul>
9645     *<p>Reference:
9646     *
9647     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2005,
9648     *     Astron.Astrophys. 432, 355
9649     *
9650     *@version 2008 May 24
9651     *
9652     *  @since Release 20101201
9653     *
9654     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9655     */
9656     public static double jauGmst06(double uta, double utb, double tta, double ttb)
9657     {
9658        double t, gmst;
9659 
9660 
9661     /* TT Julian centuries since J2000.0. */
9662        t = ((tta - DJ00) + ttb) / DJC;
9663 
9664     /* Greenwich mean sidereal time, IAU 2006. */
9665        gmst = jauAnp(jauEra00(uta, utb) +
9666                       (    0.014506     +
9667                       (  4612.156534    +
9668                       (     1.3915817   +
9669                       (    -0.00000044  +
9670                       (    -0.000029956 +
9671                       (    -0.0000000368 )
9672               * t) * t) * t) * t) * t) * DAS2R);
9673 
9674        return gmst;
9675 
9676         }
9677     
9678 
9679     /**
9680     *  Universal Time to Greenwich mean sidereal time (IAU 1982 model).
9681     *
9682     *<p>This function is derived from the International Astronomical Union's
9683     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9684     *
9685     *<p>Status:  canonical model.
9686     *
9687     *<!-- Given: -->
9688     *     @param dj1 double     UT1 Julian Date (see note)
9689     *     @param dj2 double     UT1 Julian Date (see note) 
9690     *
9691     * <!-- Returned (function value): -->
9692     *  @return double    Greenwich mean sidereal time (radians)
9693     *
9694     * <p>Notes:
9695     * <ol>
9696     *
9697     * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
9698     *     convenient way between the arguments dj1 and dj2.  For example,
9699     *     JD(UT1)=2450123.7 could be expressed in any of these ways,
9700     *     among others:
9701     *<pre>
9702     *             dj1            dj2
9703     *
9704     *         2450123.7D0        0D0        (JD method)
9705     *          2451545D0      -1421.3D0     (J2000 method)
9706     *         2400000.5D0     50123.2D0     (MJD method)
9707     *         2450123.5D0       0.2D0       (date &amp; time method)
9708     *</pre>
9709     *     The JD method is the most natural and convenient to use in
9710     *     cases where the loss of several decimal digits of resolution
9711     *     is acceptable.  The J2000 and MJD methods are good compromises
9712     *     between resolution and convenience.  The date &amp; time method is
9713     *     best matched to the algorithm used:  maximum accuracy (or, at
9714     *     least, minimum noise) is delivered when the dj1 argument is for
9715     *     0hrs UT1 on the day in question and the dj2 argument lies in the
9716     *     range 0 to 1, or vice versa.
9717     *
9718     * <li> The algorithm is based on the IAU 1982 expression.  This is
9719     *     always described as giving the GMST at 0 hours UT1.  In fact, it
9720     *     gives the difference between the GMST and the UT, the steady
9721     *     4-minutes-per-day drawing-ahead of ST with respect to UT.  When
9722     *     whole days are ignored, the expression happens to equal the GMST
9723     *     at 0 hours UT1 each day.
9724     *
9725     * <li> In this function, the entire UT1 (the sum of the two arguments
9726     *     dj1 and dj2) is used directly as the argument for the standard
9727     *     formula, the constant term of which is adjusted by 12 hours to
9728     *     take account of the noon phasing of Julian Date.  The UT1 is then
9729     *     added, but omitting whole days to conserve accuracy.
9730     *</ol>
9731     *<p>Called:<ul>
9732     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9733     * </ul>
9734     *<p>References:
9735     *
9736     *     <p>Transactions of the International Astronomical Union,
9737     *     XVIII B, 67 (1983).
9738     *
9739     *     <p>Aoki et al., Astron. Astrophys. 105, 359-361 (1982).
9740     *
9741     *@version 2008 May 24
9742     *
9743     *  @since Release 20101201
9744     *
9745     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9746     */
9747     public static double jauGmst82(double dj1, double dj2)
9748     {
9749     /* Coefficients of IAU 1982 GMST-UT1 model */
9750        double A = 24110.54841  -  DAYSEC / 2.0;
9751        double B = 8640184.812866;
9752        double C = 0.093104;
9753        double D =  -6.2e-6;
9754 
9755     /* Note: the first constant, A, has to be adjusted by 12 hours */
9756     /* because the UT1 is supplied as a Julian date, which begins  */
9757     /* at noon.                                                    */
9758 
9759        double d1, d2, t, f, gmst;
9760 
9761 
9762     /* Julian centuries since fundamental epoch. */
9763        if (dj1 < dj2) {
9764           d1 = dj1;
9765           d2 = dj2;
9766        } else {
9767           d1 = dj2;
9768           d2 = dj1;
9769        }
9770        t = (d1 + (d2 - DJ00)) / DJC;
9771 
9772     /* Fractional part of JD(UT1), in seconds. */
9773        f = DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0));
9774 
9775     /* GMST at this UT1. */
9776        gmst = jauAnp(DS2R * ((A + (B + (C + D * t) * t) * t) + f));
9777 
9778        return gmst;
9779 
9780         }
9781     
9782 
9783     /**
9784     *  Greenwich apparent sidereal time (consistent with IAU 2000
9785     *  resolutions).
9786     *
9787     *<p>This function is derived from the International Astronomical Union's
9788     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9789     *
9790     *<p>Status:  canonical model.
9791     *
9792     *<!-- Given: -->
9793     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9794     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9795     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9796     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9797     *
9798     * <!-- Returned (function value): -->
9799     *  @return double    Greenwich apparent sidereal time (radians)
9800     *
9801     * <p>Notes:
9802     * <ol>
9803     *
9804     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9805     *     Julian Dates, apportioned in any convenient way between the
9806     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9807     *     any of these ways, among others:
9808     *<pre>
9809     *            Part A        Part B
9810     *
9811     *         2450123.7           0.0       (JD method)
9812     *         2451545.0       -1421.3       (J2000 method)
9813     *         2400000.5       50123.2       (MJD method)
9814     *         2450123.5           0.2       (date &amp; time method)
9815     *</pre>
9816     *     The JD method is the most natural and convenient to use in
9817     *     cases where the loss of several decimal digits of resolution
9818     *     is acceptable (in the case of UT;  the TT is not at all critical
9819     *     in this respect).  The J2000 and MJD methods are good compromises
9820     *     between resolution and convenience.  For UT, the date &amp; time
9821     *     method is best matched to the algorithm that is used by the Earth
9822     *     Rotation Angle function, called internally:  maximum precision is
9823     *     delivered when the uta argument is for 0hrs UT1 on the day in
9824     *     question and the utb argument lies in the range 0 to 1, or vice
9825     *     versa.
9826     *
9827     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9828     *     and TT to predict the effects of precession-nutation.  If UT1 is
9829     *     used for both purposes, errors of order 100 microarcseconds
9830     *     result.
9831     *
9832     * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9833     *     used only in conjunction with other IAU 2000 compatible
9834     *     components such as precession-nutation.
9835     *
9836     * <li> The result is returned in the range 0 to 2pi.
9837     *
9838     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9839     *     Conventions 2003.
9840     *</ol>
9841     *<p>Called:<ul>
9842     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9843     *     <li>{@link #jauEe00a} equation of the equinoxes, IAU 2000A
9844     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9845     * </ul>
9846     *<p>References:
9847     *
9848     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9849     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9850     *     Astrophysics, 406, 1135-1149 (2003)
9851     *
9852     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9853     *     IERS Technical Note No. 32, BKG (2004)
9854     *
9855     *@version 2008 May 16
9856     *
9857     *  @since Release 20101201
9858     *
9859     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9860     */
9861     public static double jauGst00a(double uta, double utb, double tta, double ttb)
9862     {
9863        double gmst00, ee00a, gst;
9864 
9865 
9866        gmst00 = jauGmst00(uta, utb, tta, ttb);
9867        ee00a = jauEe00a(tta, ttb);
9868        gst = jauAnp(gmst00 + ee00a);
9869 
9870        return gst;
9871 
9872         }
9873     
9874 
9875     /**
9876     *  Greenwich apparent sidereal time (consistent with IAU 2000
9877     *  resolutions but using the truncated nutation model IAU 2000B).
9878     *
9879     *<p>This function is derived from the International Astronomical Union's
9880     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9881     *
9882     *<p>Status:  support function.
9883     *
9884     *<!-- Given: -->
9885     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9886     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9887     *
9888     * <!-- Returned (function value): -->
9889     *  @return double    Greenwich apparent sidereal time (radians)
9890     *
9891     * <p>Notes:
9892     * <ol>
9893     *
9894     * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
9895     *     convenient way between the argument pair.  For example,
9896     *     JD=2450123.7 could be expressed in any of these ways, among
9897     *     others:
9898     *<pre>
9899     *             uta            utb
9900     *
9901     *         2450123.7           0.0       (JD method)
9902     *         2451545.0       -1421.3       (J2000 method)
9903     *         2400000.5       50123.2       (MJD method)
9904     *         2450123.5           0.2       (date &amp; time method)
9905     *</pre>
9906     *     The JD method is the most natural and convenient to use in cases
9907     *     where the loss of several decimal digits of resolution is
9908     *     acceptable.  The J2000 and MJD methods are good compromises
9909     *     between resolution and convenience.  For UT, the date &amp; time
9910     *     method is best matched to the algorithm that is used by the Earth
9911     *     Rotation Angle function, called internally:  maximum precision is
9912     *     delivered when the uta argument is for 0hrs UT1 on the day in
9913     *     question and the utb argument lies in the range 0 to 1, or vice
9914     *     versa.
9915     *
9916     * <li> The result is compatible with the IAU 2000 resolutions, except
9917     *     that accuracy has been compromised for the sake of speed and
9918     *     convenience in two respects:
9919     *
9920     *     . UT is used instead of TDB (or TT) to compute the precession
9921     *       component of GMST and the equation of the equinoxes.  This
9922     *       results in errors of order 0.1 mas at present.
9923     *
9924     *     . The IAU 2000B abridged nutation model (McCarthy &amp; Luzum, 2001)
9925     *       is used, introducing errors of up to 1 mas.
9926     *
9927     * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9928     *     used only in conjunction with other IAU 2000 compatible
9929     *     components such as precession-nutation.
9930     *
9931     * <li> The result is returned in the range 0 to 2pi.
9932     *
9933     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9934     *     Conventions 2003.
9935     *</ol>
9936     *<p>Called:<ul>
9937     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9938     *     <li>{@link #jauEe00b} equation of the equinoxes, IAU 2000B
9939     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9940     * </ul>
9941     *<p>References:
9942     *
9943     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9944     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9945     *     Astrophysics, 406, 1135-1149 (2003)
9946     *
9947     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
9948     *     precession-nutation of the celestial pole", Celestial Mechanics &amp;
9949     *     Dynamical Astronomy, 85, 37-49 (2003)
9950     *
9951     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9952     *     IERS Technical Note No. 32, BKG (2004)
9953     *
9954     *@version 2008 May 16
9955     *
9956     *  @since Release 20101201
9957     *
9958     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9959     */
9960     public static double jauGst00b(double uta, double utb)
9961     {
9962        double gmst00, ee00b, gst;
9963 
9964 
9965        gmst00 = jauGmst00(uta, utb, uta, utb);
9966        ee00b = jauEe00b(uta, utb);
9967        gst = jauAnp(gmst00 + ee00b);
9968 
9969        return gst;
9970 
9971         }
9972     
9973 
9974     /**
9975     *  Greenwich apparent sidereal time, IAU 2006, given the NPB matrix.
9976     *
9977     *<p>This function is derived from the International Astronomical Union's
9978     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9979     *
9980     *<p>Status:  support function.
9981     *
9982     *<!-- Given: -->
9983     *     @param uta double         UT1 as a 2-part Julian Date (Notes 1,2)
9984     *     @param utb double         UT1 as a 2-part Julian Date (Notes 1,2) 
9985     *     @param tta double         TT as a 2-part Julian Date (Notes 1,2)
9986     *     @param ttb double         TT as a 2-part Julian Date (Notes 1,2) 
9987     *     @param rnpb      double[3][3]   nutation x precession x bias matrix
9988     *
9989     * <!-- Returned (function value): -->
9990     *  @return double        Greenwich apparent sidereal time (radians)
9991     *
9992     * <p>Notes:
9993     * <ol>
9994     *
9995     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9996     *     Julian Dates, apportioned in any convenient way between the
9997     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9998     *     any of these ways, among others:
9999     *<pre>
10000     *            Part A        Part B
10001     *
10002     *         2450123.7           0.0       (JD method)
10003     *         2451545.0       -1421.3       (J2000 method)
10004     *         2400000.5       50123.2       (MJD method)
10005     *         2450123.5           0.2       (date &amp; time method)
10006     *</pre>
10007     *     The JD method is the most natural and convenient to use in
10008     *     cases where the loss of several decimal digits of resolution
10009     *     is acceptable (in the case of UT;  the TT is not at all critical
10010     *     in this respect).  The J2000 and MJD methods are good compromises
10011     *     between resolution and convenience.  For UT, the date &amp; time
10012     *     method is best matched to the algorithm that is used by the Earth
10013     *     rotation angle function, called internally:  maximum precision is
10014     *     delivered when the uta argument is for 0hrs UT1 on the day in
10015     *     question and the utb argument lies in the range 0 to 1, or vice
10016     *     versa.
10017     *
10018     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10019     *     and TT to predict the effects of precession-nutation.  If UT1 is
10020     *     used for both purposes, errors of order 100 microarcseconds
10021     *     result.
10022     *
10023     * <li> Although the function uses the IAU 2006 series for s+XY/2, it is
10024     *     otherwise independent of the precession-nutation model and can in
10025     *     practice be used with any equinox-based NPB matrix.
10026     *
10027     * <li> The result is returned in the range 0 to 2pi.
10028     *</ol>
10029     *<p>Called:<ul>
10030     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
10031     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
10032     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10033     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
10034     *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
10035     * </ul>
10036     *<p>Reference:
10037     *
10038     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
10039     *
10040     *@version 2008 May 24
10041     *
10042     *  @since Release 20101201
10043     *
10044     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10045     */
10046     public static double jauGst06(double uta, double utb, double tta, double ttb,
10047                     double rnpb[][])
10048     {
10049        double s, era, eors, gst;
10050 
10051 
10052     /* Extract CIP coordinates. */
10053        CelestialIntermediatePole cip = jauBpn2xy(rnpb);
10054 
10055     /* The CIO locator, s. */
10056        s = jauS06(tta, ttb, cip.x, cip.y);
10057 
10058     /* Greenwich apparent sidereal time. */
10059        era = jauEra00(uta, utb);
10060        eors = jauEors(rnpb, s);
10061        gst = jauAnp(era - eors);
10062 
10063        return gst;
10064 
10065         }
10066     
10067 
10068     /**
10069     *  Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
10070     *  resolutions).
10071     *
10072     *<p>This function is derived from the International Astronomical Union's
10073     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10074     *
10075     *<p>Status:  canonical model.
10076     *
10077     *<!-- Given: -->
10078     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
10079     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
10080     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
10081     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
10082     *
10083     * <!-- Returned (function value): -->
10084     *  @return double    Greenwich apparent sidereal time (radians)
10085     *
10086     * <p>Notes:
10087     * <ol>
10088     *
10089     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10090     *     Julian Dates, apportioned in any convenient way between the
10091     *     argument pairs.  For example, JD=2450123.7 could be expressed in
10092     *     any of these ways, among others:
10093     *<pre>
10094     *            Part A        Part B
10095     *
10096     *         2450123.7           0.0       (JD method)
10097     *         2451545.0       -1421.3       (J2000 method)
10098     *         2400000.5       50123.2       (MJD method)
10099     *         2450123.5           0.2       (date &amp; time method)
10100     *</pre>
10101     *     The JD method is the most natural and convenient to use in
10102     *     cases where the loss of several decimal digits of resolution
10103     *     is acceptable (in the case of UT;  the TT is not at all critical
10104     *     in this respect).  The J2000 and MJD methods are good compromises
10105     *     between resolution and convenience.  For UT, the date &amp; time
10106     *     method is best matched to the algorithm that is used by the Earth
10107     *     rotation angle function, called internally:  maximum precision is
10108     *     delivered when the uta argument is for 0hrs UT1 on the day in
10109     *     question and the utb argument lies in the range 0 to 1, or vice
10110     *     versa.
10111     *
10112     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10113     *     and TT to predict the effects of precession-nutation.  If UT1 is
10114     *     used for both purposes, errors of order 100 microarcseconds
10115     *     result.
10116     *
10117     * <li> This GAST is compatible with the IAU 2000/2006 resolutions and
10118     *     must be used only in conjunction with IAU 2006 precession and
10119     *     IAU 2000A nutation.
10120     *
10121     * <li> The result is returned in the range 0 to 2pi.
10122     *</ol>
10123     *<p>Called:<ul>
10124     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
10125     *     <li>{@link #jauGst06} Greenwich apparent ST, IAU 2006, given NPB matrix
10126     * </ul>
10127     *<p>Reference:
10128     *
10129     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
10130     *
10131     *@version 2008 May 16
10132     *
10133     *  @since Release 20101201
10134     *
10135     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10136     */
10137     public static double jauGst06a(double uta, double utb, double tta, double ttb)
10138     {
10139        double rnpb[][] = new double[3][3], gst;
10140 
10141 
10142     /* Classical nutation x precession x bias matrix, IAU 2000A. */
10143        rnpb = jauPnm06a(tta, ttb);
10144 
10145     /* Greenwich apparent sidereal time. */
10146        gst = jauGst06(uta, utb, tta, ttb, rnpb);
10147 
10148        return gst;
10149 
10150         }
10151     
10152 
10153     /**
10154     *  Greenwich apparent sidereal time (consistent with IAU 1982/94
10155     *  resolutions).
10156     *
10157     *<p>This function is derived from the International Astronomical Union's
10158     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10159     *
10160     *<p>Status:  support function.
10161     *
10162     *<!-- Given: -->
10163     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
10164     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
10165     *
10166     * <!-- Returned (function value): -->
10167     *  @return double    Greenwich apparent sidereal time (radians)
10168     *
10169     * <p>Notes:
10170     * <ol>
10171     *
10172     * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
10173     *     convenient way between the argument pair.  For example,
10174     *     JD=2450123.7 could be expressed in any of these ways, among
10175     *     others:
10176     *<pre>
10177     *             uta            utb
10178     *
10179     *         2450123.7           0.0       (JD method)
10180     *         2451545.0       -1421.3       (J2000 method)
10181     *         2400000.5       50123.2       (MJD method)
10182     *         2450123.5           0.2       (date &amp; time method)
10183     *</pre>
10184     *     The JD method is the most natural and convenient to use in cases
10185     *     where the loss of several decimal digits of resolution is
10186     *     acceptable.  The J2000 and MJD methods are good compromises
10187     *     between resolution and convenience.  For UT, the date &amp; time
10188     *     method is best matched to the algorithm that is used by the Earth
10189     *     Rotation Angle function, called internally:  maximum precision is
10190     *     delivered when the uta argument is for 0hrs UT1 on the day in
10191     *     question and the utb argument lies in the range 0 to 1, or vice
10192     *     versa.
10193     *
10194     * <li> The result is compatible with the IAU 1982 and 1994 resolutions,
10195     *     except that accuracy has been compromised for the sake of
10196     *     convenience in that UT is used instead of TDB (or TT) to compute
10197     *     the equation of the equinoxes.
10198     *
10199     * <li> This GAST must be used only in conjunction with contemporaneous
10200     *     IAU standards such as 1976 precession, 1980 obliquity and 1982
10201     *     nutation.  It is not compatible with the IAU 2000 resolutions.
10202     *
10203     * <li> The result is returned in the range 0 to 2pi.
10204     *</ol>
10205     *<p>Called:<ul>
10206     *     <li>{@link #jauGmst82} Greenwich mean sidereal time, IAU 1982
10207     *     <li>{@link #jauEqeq94} equation of the equinoxes, IAU 1994
10208     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10209     * </ul>
10210     *<p>References:
10211     *
10212     *     <p>Explanatory Supplement to the Astronomical Almanac,
10213     *     P. Kenneth Seidelmann (ed), University Science Books (1992)
10214     *
10215     *     IAU Resolution C7, Recommendation 3 (1994)
10216     *
10217     *@version 2008 May 16
10218     *
10219     *  @since Release 20101201
10220     *
10221     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10222     */
10223     public static double jauGst94(double uta, double utb)
10224     {
10225        double gmst82, eqeq94, gst;
10226 
10227 
10228        gmst82 = jauGmst82(uta, utb);
10229        eqeq94 = jauEqeq94(uta, utb);
10230        gst = jauAnp(gmst82  + eqeq94);
10231 
10232        return gst;
10233 
10234         }
10235     
10236 
10237     /**
10238     *  Transform Hipparcos star data into the FK5 (J2000.0) system.
10239     *
10240     *<p>This function is derived from the International Astronomical Union's
10241     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10242     *
10243     *<p>Status:  support function.
10244     *
10245     *  Given (all Hipparcos, epoch J2000.0):
10246     *     rh      double    RA (radians)
10247     *     dh      double    Dec (radians)
10248     *     drh     double    proper motion in RA (dRA/dt, rad/Jyear)
10249     *     ddh     double    proper motion in Dec (dDec/dt, rad/Jyear)
10250     *     pxh     double    parallax (arcsec)
10251     *     rvh     double    radial velocity (km/s, positive = receding)
10252     *
10253     *  Returned (all FK5, equinox J2000.0, epoch J2000.0):
10254     *     r5      double    RA (radians)
10255     *     d5      double    Dec (radians)
10256     *     dr5     double    proper motion in RA (dRA/dt, rad/Jyear)
10257     *     dd5     double    proper motion in Dec (dDec/dt, rad/Jyear)
10258     *     px5     double    parallax (arcsec)
10259     *     rv5     double    radial velocity (km/s, positive = receding)
10260     *
10261     * <p>Notes:
10262     * <ol>
10263     *
10264     * <li> This function transforms Hipparcos star positions and proper
10265     *     motions into FK5 J2000.0.
10266     *
10267     * <li> The proper motions in RA are dRA/dt rather than
10268     *     cos(Dec)*dRA/dt, and are per year rather than per century.
10269     *
10270     * <li> The FK5 to Hipparcos transformation is modeled as a pure
10271     *     rotation and spin;  zonal errors in the FK5 catalog are not
10272     *     taken into account.
10273     *
10274     * <li> See also jauFk52h, jauFk5hz, jauHfk5z.
10275     *</ol>
10276     *<p>Called:<ul>
10277     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
10278     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10279     *     <li>{@link #jauRv2m} r-vector to r-matrix
10280     *     <li>{@link #jauRxp} product of r-matrix and p-vector
10281     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10282     *     <li>{@link #jauPxp} vector product of two p-vectors
10283     *     <li>{@link #jauPmp} p-vector minus p-vector
10284     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
10285     * </ul>
10286     *<p>Reference:
10287     *
10288     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
10289     *
10290     *@version 2009 December 17
10291     *
10292     *  @since Release 20101201
10293     *
10294     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10295     */
10296     public static CatalogCoords jauH2fk5(double rh, double dh,
10297                   double drh, double ddh, double pxh, double rvh)
10298     {
10299        int i;
10300        double pvh[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pv5[][] = new double[2][3];
10301 
10302 
10303     /* Hipparcos barycentric position/velocity pv-vector (normalized). */
10304        jauStarpv(rh, dh, drh, ddh, pxh, rvh, pvh);
10305 
10306     /* FK5 to Hipparcos orientation matrix and spin vector. */
10307        jauFk5hip(r5h, s5h);
10308 
10309     /* Make spin units per day instead of per year. */
10310        for ( i = 0; i < 3; s5h[i++] /= 365.25 );
10311 
10312     /* Orient the spin into the Hipparcos system. */
10313        sh = jauRxp(r5h, s5h);
10314 
10315     /* De-orient the Hipparcos position into the FK5 system. */
10316        pv5[0] = jauTrxp(r5h, pvh[0]);
10317 
10318     /* Apply spin to the position giving an extra space motion component. */
10319        wxp = jauPxp(pvh[0],sh);
10320 
10321     /* Subtract this component from the Hipparcos space motion. */
10322        vv = jauPmp(pvh[1], wxp);
10323 
10324     /* De-orient the Hipparcos space motion into the FK5 system. */
10325        pv5[1] = jauTrxp(r5h, vv);
10326 
10327     /* FK5 pv-vector to spherical., r5, d5, dr5, dd5, px5, rv5 */
10328        CatalogCoords cat = null;
10329        try {
10330            cat = jauPvstar(pv5);
10331        } catch (JSOFAInternalError e) {
10332            // original code just ignored this possibility
10333            e.printStackTrace();
10334        }
10335 
10336        return cat;
10337 
10338         }
10339     
10340 
10341     /**
10342     *  Transform a Hipparcos star position into FK5 J2000.0, assuming
10343     *  zero Hipparcos proper motion.
10344     *
10345     *<p>This function is derived from the International Astronomical Union's
10346     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10347     *
10348     *<p>Status:  support function.
10349     *
10350     *<!-- Given: -->
10351     *     @param rh             double     Hipparcos RA (radians)
10352     *     @param dh             double     Hipparcos Dec (radians)
10353     *     @param date1 double     TDB date (Note 1)
10354     *     @param date2 double     TDB date (Note 1) 
10355     *
10356     * FIXME original did not return the parallax and radial velocity of the CatalogCoords type.
10357     *  Returned (all FK5, equinox J2000.0, date date1+date2):
10358     *     r5            double    RA (radians)
10359     *     d5            double    Dec (radians)
10360     *     dr5           double    FK5 RA proper motion (rad/year, Note 4)
10361     *     dd5           double    Dec proper motion (rad/year, Note 4)
10362     *
10363     * <p>Notes:
10364     * <ol>
10365     *
10366     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10367     *     convenient way between the two arguments.  For example,
10368     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10369     *     among others:
10370     *<pre>
10371     *            date1          date2
10372     *
10373     *         2450123.7           0.0       (JD method)
10374     *         2451545.0       -1421.3       (J2000 method)
10375     *         2400000.5       50123.2       (MJD method)
10376     *         2450123.5           0.2       (date &amp; time method)
10377     *</pre>
10378     *     The JD method is the most natural and convenient to use in
10379     *     cases where the loss of several decimal digits of resolution
10380     *     is acceptable.  The J2000 method is best matched to the way
10381     *     the argument is handled internally and will deliver the
10382     *     optimum resolution.  The MJD method and the date &amp; time methods
10383     *     are both good compromises between resolution and convenience.
10384     *
10385     * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
10386     *
10387     * <li> The FK5 to Hipparcos transformation is modeled as a pure rotation
10388     *     and spin;  zonal errors in the FK5 catalogue are not taken into
10389     *     account.
10390     *
10391     * <li> It was the intention that Hipparcos should be a close
10392     *     approximation to an inertial frame, so that distant objects have
10393     *     zero proper motion;  such objects have (in general) non-zero
10394     *     proper motion in FK5, and this function returns those fictitious
10395     *     proper motions.
10396     *
10397     * <li> The position returned by this function is in the FK5 J2000.0
10398     *     reference system but at date date1+date2.
10399     *
10400     * <li> See also jauFk52h, jauH2fk5, jauFk5zhz.
10401     *</ol>
10402     *<p>Called:<ul>
10403     *     <li>{@link #jauS2c} spherical coordinates to unit vector
10404     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10405     *     <li>{@link #jauRxp} product of r-matrix and p-vector
10406     *     <li>{@link #jauSxp} multiply p-vector by scalar
10407     *     <li>{@link #jauRxr} product of two r-matrices
10408     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10409     *     <li>{@link #jauPxp} vector product of two p-vectors
10410     *     <li>{@link #jauPv2s} pv-vector to spherical
10411     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10412     * </ul>
10413     *<p>Reference:
10414     *
10415     *     <p>F.Mignard &amp; M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
10416     *
10417     *@version 2009 December 17
10418     *
10419     *  @since Release 20101201
10420     *
10421     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10422     *
10423     */
10424     public static CatalogCoords jauHfk5z(double rh, double dh, double date1, double date2)
10425     {
10426        double t, ph[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], vst[] = new double[3],
10427        rst[][] = new double[3][3], r5ht[][] = new double[3][3], pv5e[][] = new double[2][3], vv[] = new double[3];
10428 
10429 
10430     /* Time interval from fundamental epoch J2000.0 to given date (JY). */
10431        t = ((date1 - DJ00) + date2) / DJY;
10432 
10433     /* Hipparcos barycentric position vector (normalized). */
10434        ph = jauS2c(rh,dh);
10435 
10436     /* FK5 to Hipparcos orientation matrix and spin vector. */
10437        jauFk5hip(r5h, s5h);
10438 
10439     /* Rotate the spin into the Hipparcos system. */
10440        sh = jauRxp(r5h, s5h);
10441 
10442     /* Accumulated Hipparcos wrt FK5 spin over that interval. */
10443        vst = jauSxp(t,s5h);
10444 
10445     /* Express the accumulated spin as a rotation matrix. */
10446        rst = jauRv2m(vst);
10447 
10448     /* Rotation matrix:  accumulated spin, then FK5 to Hipparcos. */
10449        r5ht = jauRxr(r5h, rst);
10450 
10451     /* De-orient &amp; de-spin the Hipparcos position into FK5 J2000.0. */
10452        pv5e[0] = jauTrxp(r5ht, ph);
10453 
10454     /* Apply spin to the position giving a space motion. */
10455        vv = jauPxp(sh,ph);
10456 
10457     /* De-orient &amp; de-spin the Hipparcos space motion into FK5 J2000.0. */
10458        pv5e[1] = jauTrxp(r5ht, vv);
10459 
10460     /* FK5 position/velocity pv-vector to spherical. */
10461        SphericalPositionVelocity pvs = jauPv2s(pv5e);
10462        double r5 = jauAnp(pvs.pos.theta);
10463 
10464        return new CatalogCoords(r5, pvs.pos.phi, pvs.vel.theta, pvs.vel.phi, 0.0, 0.0);
10465 
10466         }
10467     
10468 
10469     /**
10470     *  Initialize an r-matrix to the identity matrix.
10471     *
10472     *<p>This function is derived from the International Astronomical Union's
10473     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10474     *
10475     *<p>Status:  vector/matrix support function.
10476     *
10477     *<!-- Returned: -->
10478     *     @param r        double[3][3]      <u>returned</u> r-matrix
10479     *
10480     *<p>Called:<ul>
10481     *     <li>{@link #jauZr} zero r-matrix
10482     * </ul>
10483     *@version 2008 May 11
10484     *
10485     *  @since Release 20101201
10486     *
10487     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10488     */
10489     public static void jauIr(double r[][])
10490     {
10491        jauZr(r);
10492        r[0][0] = 1.0;
10493        r[1][1] = 1.0;
10494        r[2][2] = 1.0;
10495 
10496        return;
10497 
10498         }
10499     
10500 
10501     /**
10502     *  Julian Date to Gregorian year, month, day, and fraction of a day.
10503     *
10504     *<p>This function is derived from the International Astronomical Union's
10505     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10506     *
10507     *<p>Status:  support function.
10508     *
10509     *<!-- Given: -->
10510     *     @param dj1 double    Julian Date (Notes 1, 2)
10511     *     @param dj2 double    Julian Date (Notes 1, 2) 
10512     *
10513     *  Returned (arguments):
10514     *     iy        int      year
10515     *     im        int      month
10516     *     id        int      day
10517     *     fd        double   fraction of day
10518     *
10519     * <!-- Returned (function value): -->
10520     *  @return int      status:
10521     *                           0 = OK
10522     *                          -1 = unacceptable date (Note 3)
10523     *
10524     * <p>Notes:
10525     * <ol>
10526     *
10527     * <li> The earliest valid date is -68569.5 (-4900 March 1).  The
10528     *     largest value accepted is 10^9.
10529     *
10530     * <li> The Julian Date is apportioned in any convenient way between
10531     *     the arguments dj1 and dj2.  For example, JD=2450123.7 could
10532     *     be expressed in any of these ways, among others:
10533     *<pre>
10534     *            dj1             dj2
10535     *
10536     *         2450123.7           0.0       (JD method)
10537     *         2451545.0       -1421.3       (J2000 method)
10538     *         2400000.5       50123.2       (MJD method)
10539     *         2450123.5           0.2       (date &amp; time method)
10540     *</pre>
10541     * <li> In early eras the conversion is from the "proleptic Gregorian
10542     *     calendar";  no account is taken of the date(s) of adoption of
10543     *     the Gregorian calendar, nor is the AD/BC numbering convention
10544     *     observed.
10545     *</ol>
10546     *<p>Reference:
10547     *
10548     *     <p>Explanatory Supplement to the Astronomical Almanac,
10549     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10550     *     Section 12.92 (p604).
10551     *
10552     *@version 2008 May 26
10553     *
10554     *  @since Release 20101201
10555     *
10556     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10557     */
10558     public static Calendar jauJd2cal(double dj1, double dj2) throws JSOFAIllegalParameter
10559     {
10560     /* Minimum and maximum allowed JD */
10561        final double djmin = -68569.5;
10562        final double djmax = 1e9;
10563 
10564        long jd, l, n, i, k;
10565        double dj, d1, d2, f1, f2, f, d;
10566 
10567 
10568     /* Verify date is acceptable. */
10569        dj = dj1 + dj2;
10570        if (dj < djmin || dj > djmax) throw new JSOFAIllegalParameter("input julian date out of range", -1);
10571 
10572     /* Copy the date, big then small, and re-align to midnight. */
10573        if (dj1 >= dj2) {
10574           d1 = dj1;
10575           d2 = dj2;
10576        } else {
10577           d1 = dj2;
10578           d2 = dj1;
10579        }
10580        d2 -= 0.5;
10581 
10582     /* Separate day and fraction. */
10583        f1 = fmod(d1, 1.0);
10584        f2 = fmod(d2, 1.0);
10585        f = fmod(f1 + f2, 1.0);
10586        if (f < 0.0) f += 1.0;
10587        d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 - f);
10588        jd = (long) floor(d) + 1L;
10589 
10590     /* Express day in Gregorian calendar. */
10591        l = jd + 68569L;
10592        n = (4L * l) / 146097L;
10593        l -= (146097L * n + 3L) / 4L;
10594        i = (4000L * (l + 1L)) / 1461001L;
10595        l -= (1461L * i) / 4L - 31L;
10596        k = (80L * l) / 2447L;
10597        int id = (int) (l - (2447L * k) / 80L);
10598        l = k / 11L;
10599        int im = (int) (k + 2L - 12L * l);
10600        int iy = (int) (100L * (n - 49L) + i + l);
10601       
10602 
10603        return new Calendar(iy, im, id, f);
10604 
10605         }
10606      
10607     /**
10608     *  Julian Date to Gregorian Calendar, expressed in a form convenient
10609     *  for formatting messages:  rounded to a specified precision.
10610     *
10611     *<p>This function is derived from the International Astronomical Union's
10612     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10613     *
10614     *<p>Status:  support function.
10615     *
10616     *<!-- Given: -->
10617     *     @param ndp        int       number of decimal places of days in fraction
10618     *     @param dj1 double    dj1+dj2 = Julian Date (Note 1)
10619     *     @param dj2 double    dj1+dj2 = Julian Date (Note 1) 
10620     *
10621     *<!-- Returned: -->
10622     *     @param iymdf      int[4]     <u>returned</u> year, month, day, fraction in Gregorian calendar
10623     *
10624     *
10625     * <!-- Returned (function value): -->
10626     *  @return int      status:
10627     *                          -1 = date out of range
10628     *                           0 = OK
10629     *                          +1 = NDP not 0-9 (interpreted as 0)
10630     *
10631     * <p>Notes:
10632     * <ol>
10633     *
10634     * <li> The Julian Date is apportioned in any convenient way between
10635     *     the arguments dj1 and dj2.  For example, JD=2450123.7 could
10636     *     be expressed in any of these ways, among others:
10637     *<pre>
10638     *             dj1            dj2
10639     *
10640     *         2450123.7           0.0       (JD method)
10641     *         2451545.0       -1421.3       (J2000 method)
10642     *         2400000.5       50123.2       (MJD method)
10643     *         2450123.5           0.2       (date &amp; time method)
10644     *</pre>
10645     * <li> In early eras the conversion is from the "Proleptic Gregorian
10646     *     Calendar";  no account is taken of the date(s) of adoption of
10647     *     the Gregorian Calendar, nor is the AD/BC numbering convention
10648     *     observed.
10649     *
10650     * <li> Refer to the function jauJd2cal.
10651     *
10652     * <li> NDP should be 4 or less if internal overflows are to be
10653     *     avoided on machines which use 16-bit integers.
10654     *</ol>
10655     *<p>Called:<ul>
10656     *     <li>{@link #jauJd2cal} JD to Gregorian calendar
10657     * </ul>
10658     *<p>Reference:
10659     *
10660     *     <p>Explanatory Supplement to the Astronomical Almanac,
10661     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10662     *     Section 12.92 (p604).
10663     *
10664     *@version 2008 October 28
10665     *
10666     *  @since Release 20101201
10667     *
10668     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10669     */
10670     public static int jauJdcalf(int ndp, double dj1, double dj2, int iymdf[])
10671     {
10672        int j;
10673        double denom, d1, d2, f1, f2, f;
10674 
10675 
10676     /* Denominator of fraction (e.g. 100 for 2 decimal places). */
10677        if ((ndp >= 0) && (ndp <= 9)) {
10678           j = 0;
10679           denom = pow(10.0, ndp);
10680        } else {
10681           j = 1;
10682           denom = 1.0;
10683        }
10684 
10685     /* Copy the date, big then small, and realign to midnight. */
10686        if (dj1 >= dj2) {
10687           d1 = dj1;
10688           d2 = dj2;
10689        } else {
10690           d1 = dj2;
10691           d2 = dj1;
10692        }
10693        d2 -= 0.5;
10694 
10695     /* Separate days and fractions. */
10696        f1 = fmod(d1, 1.0);
10697        f2 = fmod(d2, 1.0);
10698        d1 = floor(d1 - f1);
10699        d2 = floor(d2 - f2);
10700 
10701     /* Round the total fraction to the specified number of places. */
10702        f = floor((f1 + f2) * denom) / denom;
10703 
10704     /* Re-assemble the rounded date and re-align to noon. */
10705        d2 += f + 0.5;
10706 
10707        /* Convert to Gregorian Calendar. */
10708        try {
10709            Calendar cal = jauJd2cal(d1, d2);
10710            iymdf[0] = cal.iy;
10711            iymdf[1] = cal.im;
10712            iymdf[2] = cal.id;
10713            iymdf[3] = (int) (cal.fd * denom);
10714        } catch (JSOFAIllegalParameter e) {
10715            j = -1;
10716        }
10717 
10718     /* Return the status. */
10719        return j;
10720 
10721         }
10722     
10723 
10724     /**
10725     *  Form the matrix of nutation for a given date, IAU 2000A model.
10726     *
10727     *<p>This function is derived from the International Astronomical Union's
10728     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10729     *
10730     *<p>Status:  support function.
10731     *
10732     *<!-- Given: -->
10733     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10734     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10735     *
10736     *<!-- Returned: -->
10737     *     @return rmatn         double[3][3]      <u>returned</u> nutation matrix
10738     *
10739     * <p>Notes:
10740     * <ol>
10741     *
10742     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10743     *     convenient way between the two arguments.  For example,
10744     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10745     *     among others:
10746     *<pre>
10747     *            date1          date2
10748     *
10749     *         2450123.7           0.0       (JD method)
10750     *         2451545.0       -1421.3       (J2000 method)
10751     *         2400000.5       50123.2       (MJD method)
10752     *         2450123.5           0.2       (date &amp; time method)
10753     *</pre>
10754     *     The JD method is the most natural and convenient to use in
10755     *     cases where the loss of several decimal digits of resolution
10756     *     is acceptable.  The J2000 method is best matched to the way
10757     *     the argument is handled internally and will deliver the
10758     *     optimum resolution.  The MJD method and the date &amp; time methods
10759     *     are both good compromises between resolution and convenience.
10760     *
10761     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10762     *     the p-vector V(true) is with respect to the true equatorial triad
10763     *     of date and the p-vector V(mean) is with respect to the mean
10764     *     equatorial triad of date.
10765     *
10766     * <li> A faster, but slightly less accurate result (about 1 mas), can be
10767     *     obtained by using instead the jauNum00b function.
10768     *</ol>
10769     *<p>Called:<ul>
10770     *     <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
10771     * </ul>
10772     *<p>Reference:
10773     *
10774     *     <p>Explanatory Supplement to the Astronomical Almanac,
10775     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10776     *     Section 3.222-3 (p114).
10777     *
10778     *@version 2008 May 12
10779     *
10780     *  @since Release 20101201
10781     *
10782     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10783     */
10784     public static double[][] jauNum00a(double date1, double date2)
10785     {
10786 
10787     /* Obtain the required matrix (discarding other results). */
10788        PrecessionNutation pn = jauPn00a(date1, date2);
10789 
10790        return pn.rn ;
10791 
10792         }
10793     
10794 
10795     /**
10796     *  Form the matrix of nutation for a given date, IAU 2000B model.
10797     *
10798     *<p>This function is derived from the International Astronomical Union's
10799     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10800     *
10801     *<p>Status:  support function.
10802     *
10803     *<!-- Given: -->
10804     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10805     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10806     *
10807     *<!-- Returned: -->
10808     *     @return rmatn         double[3][3]     <u>returned</u> nutation matrix
10809     *
10810     * <p>Notes:
10811     * <ol>
10812     *
10813     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10814     *     convenient way between the two arguments.  For example,
10815     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10816     *     among others:
10817     *<pre>
10818     *            date1          date2
10819     *
10820     *         2450123.7           0.0       (JD method)
10821     *         2451545.0       -1421.3       (J2000 method)
10822     *         2400000.5       50123.2       (MJD method)
10823     *         2450123.5           0.2       (date &amp; time method)
10824     *</pre>
10825     *     The JD method is the most natural and convenient to use in
10826     *     cases where the loss of several decimal digits of resolution
10827     *     is acceptable.  The J2000 method is best matched to the way
10828     *     the argument is handled internally and will deliver the
10829     *     optimum resolution.  The MJD method and the date &amp; time methods
10830     *     are both good compromises between resolution and convenience.
10831     *
10832     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10833     *     the p-vector V(true) is with respect to the true equatorial triad
10834     *     of date and the p-vector V(mean) is with respect to the mean
10835     *     equatorial triad of date.
10836     *
10837     * <li> The present function is faster, but slightly less accurate (about
10838     *     1 mas), than the jauNum00a function.
10839     *</ol>
10840     *<p>Called:<ul>
10841     *     <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
10842     * </ul>
10843     *<p>Reference:
10844     *
10845     *     <p>Explanatory Supplement to the Astronomical Almanac,
10846     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10847     *     Section 3.222-3 (p114).
10848     *
10849     *@version 2008 May 12
10850     *
10851     *  @since Release 20101201
10852     *
10853     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10854     */
10855     public static double[][] jauNum00b(double date1, double date2)
10856     {
10857 
10858     /* Obtain the required matrix (discarding other results). */
10859        PrecessionNutation pn = jauPn00b(date1, date2);
10860  
10861        return pn.rn;
10862 
10863     }
10864     
10865 
10866     /**
10867     *  Form the matrix of nutation for a given date, IAU 2006/2000A model.
10868     *
10869     *<p>This function is derived from the International Astronomical Union's
10870     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10871     *
10872     *<p>Status:  support function.
10873     *
10874     *<!-- Given: -->
10875     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10876     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10877     *
10878     *<!-- Returned: -->
10879     *     @return rmatn          double[3][3]      <u>returned</u> nutation matrix
10880     *
10881     * <p>Notes:
10882     * <ol>
10883     *
10884     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10885     *     convenient way between the two arguments.  For example,
10886     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10887     *     among others:
10888     *<pre>
10889     *            date1          date2
10890     *
10891     *         2450123.7           0.0       (JD method)
10892     *         2451545.0       -1421.3       (J2000 method)
10893     *         2400000.5       50123.2       (MJD method)
10894     *         2450123.5           0.2       (date &amp; time method)
10895     *</pre>
10896     *     The JD method is the most natural and convenient to use in
10897     *     cases where the loss of several decimal digits of resolution
10898     *     is acceptable.  The J2000 method is best matched to the way
10899     *     the argument is handled internally and will deliver the
10900     *     optimum resolution.  The MJD method and the date &amp; time methods
10901     *     are both good compromises between resolution and convenience.
10902     *
10903     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10904     *     the p-vector V(true) is with respect to the true equatorial triad
10905     *     of date and the p-vector V(mean) is with respect to the mean
10906     *     equatorial triad of date.
10907     *</ol>
10908     *<p>Called:<ul>
10909     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
10910     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
10911     *     <li>{@link #jauNumat} form nutation matrix
10912     * </ul>
10913     *<p>Reference:
10914     *
10915     *     <p>Explanatory Supplement to the Astronomical Almanac,
10916     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10917     *     Section 3.222-3 (p114).
10918     *
10919     *@version 2008 May 12
10920     *
10921     *  @since Release 20101201
10922     *
10923     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10924     */
10925     public static double[][] jauNum06a(double date1, double date2)
10926     {
10927        double eps, rmatn[][];
10928 
10929 
10930     /* Mean obliquity. */
10931        eps = jauObl06(date1, date2);
10932 
10933     /* Nutation components. */
10934        NutationTerms nut = jauNut06a(date1, date2);
10935 
10936     /* Nutation matrix. */
10937        rmatn = jauNumat(eps, nut.dpsi, nut.deps);
10938 
10939        return rmatn;
10940 
10941         }
10942     
10943 
10944     /**
10945     *  Form the matrix of nutation.
10946     *
10947     *<p>This function is derived from the International Astronomical Union's
10948     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10949     *
10950     *<p>Status:  support function.
10951     *
10952     *<!-- Given: -->
10953     *     @param epsa         double          mean obliquity of date (Note 1)
10954     *     @param dpsi double          nutation (Note 2)
10955     *     @param deps double          nutation (Note 2) 
10956     *
10957     *<!-- Returned: -->
10958     *     @return rmatn        double[3][3]     <u>returned</u> nutation matrix (Note 3)
10959     *
10960     * <p>Notes:
10961     * <ol>
10962     *
10963     *
10964     * <li> The supplied mean obliquity epsa, must be consistent with the
10965     *     precession-nutation models from which dpsi and deps were obtained.
10966     *
10967     * <li> The caller is responsible for providing the nutation components;
10968     *     they are in longitude and obliquity, in radians and are with
10969     *     respect to the equinox and ecliptic of date.
10970     *
10971     * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
10972     *     where the p-vector V(true) is with respect to the true
10973     *     equatorial triad of date and the p-vector V(mean) is with
10974     *     respect to the mean equatorial triad of date.
10975     *</ol>
10976     *<p>Called:<ul>
10977     *     <li>{@link #jauIr} initialize r-matrix to identity
10978     *     <li>{@link #jauRx} rotate around X-axis
10979     *     <li>{@link #jauRz} rotate around Z-axis
10980     * </ul>
10981     *<p>Reference:
10982     *
10983     *     <p>Explanatory Supplement to the Astronomical Almanac,
10984     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10985     *     Section 3.222-3 (p114).
10986     *
10987     *@version 2008 May 11
10988     *
10989     *  @since Release 20101201
10990     *
10991     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10992     */
10993     public static double[][] jauNumat(double epsa, double dpsi, double deps)
10994     {
10995         double rmatn[][] = new double[3][3];
10996     /* Build the rotation matrix. */
10997        jauIr(rmatn);
10998        jauRx(epsa, rmatn);
10999        jauRz(-dpsi, rmatn);
11000        jauRx(-(epsa + deps), rmatn);
11001 
11002        return rmatn;
11003 
11004         }
11005     /**
11006      * Nutation Terms.
11007      *  .
11008      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
11009      * @version $Revision$ $date$
11010      */
11011     public static class NutationTerms {
11012         /**  nutation component in longitude  */
11013         public double dpsi;
11014         /**  nutation component in obliquity */
11015         public double deps;
11016         public NutationTerms(double dpsi, double deps) {
11017             this.dpsi = dpsi;
11018             this.deps = deps;
11019         }
11020     }
11021     /**
11022     *  Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation
11023     *  with free core nutation omitted).
11024     *
11025     *<p>This function is derived from the International Astronomical Union's
11026     *  SOFA (Standards Of Fundamental Astronomy) software collection.
11027     *
11028     *<p>Status:  canonical model.
11029     *
11030     *<!-- Given: -->
11031     *     @param date1 double TT as a 2-part Julian Date (Note 1)
11032     *     @param date2 double TT as a 2-part Julian Date (Note 1)
11033     *
11034     *<!-- Returned: -->
11035     *     @return    <u>returned</u> nutation, luni-solar + planetary (Note 2)
11036     *
11037     * <p>Notes:
11038     * <ol>
11039     *
11040     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
11041     *     convenient way between the two arguments.  For example,
11042     *     JD(TT)=2450123.7 could be expressed in any of these ways,
11043     *     among others:
11044     *<pre>
11045     *            date1          date2
11046     *
11047     *         2450123.7           0.0       (JD method)
11048     *         2451545.0       -1421.3       (J2000 method)
11049     *         2400000.5       50123.2       (MJD method)
11050     *         2450123.5           0.2       (date &amp; time method)
11051     *</pre>
11052     *     The JD method is the most natural and convenient to use in
11053     *     cases where the loss of several decimal digits of resolution
11054     *     is acceptable.  The J2000 method is best matched to the way
11055     *     the argument is handled internally and will deliver the
11056     *     optimum resolution.  The MJD method and the date &amp; time methods
11057     *     are both good compromises between resolution and convenience.
11058     *
11059     * <li> The nutation components in longitude and obliquity are in radians
11060     *     and with respect to the equinox and ecliptic of date.  The
11061     *     obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
11062     *     value of 84381.448 arcsec.
11063     *
11064     *     Both the luni-solar and planetary nutations are included.  The
11065     *     latter are due to direct planetary nutations and the
11066     *     perturbations of the lunar and terrestrial orbits.
11067     *
11068     * <li> The function computes the MHB2000 nutation series with the
11069     *     associated corrections for planetary nutations.  It is an
11070     *     implementation of the nutation part of the IAU 2000A precession-
11071     *     nutation model, formally adopted by the IAU General Assembly in
11072     *     2000, namely MHB2000 (Mathews et al. 2002), but with the free
11073     *     core nutation (FCN - see Note 4) omitted.
11074     *
11075     * <li> The full MHB2000 model also contains contributions to the
11076     *     nutations in longitude and obliquity due to the free-excitation
11077     *     of the free-core-nutation during the period 1979-2000.  These FCN
11078     *     terms, which are time-dependent and unpredictable, are NOT
11079     *     included in the present function and, if required, must be
11080     *     independently computed.  With the FCN corrections included, the
11081     *     present function delivers a pole which is at current epochs
11082     *     accurate to a few hundred microarcseconds.  The omission of FCN
11083     *     introduces further errors of about that size.
11084     *
11085     * <li> The present function provides classical nutation.  The MHB2000
11086     *     algorithm, from which it is adapted, deals also with (i) the
11087     *     offsets between the GCRS and mean poles and (ii) the adjustments
11088     *     in longitude and obliquity due to the changed precession rates.
11089     *     These additional functions, namely frame bias and precession
11090     *     adjustments, are supported by the JSOFA functions jauBi00  and
11091     *     jauPr00.
11092     *
11093     * <li> The MHB2000 algorithm also provides "total" nutations, comprising
11094     *     the arithmetic sum of the frame bias, precession adjustments,
11095     *     luni-solar nutation and planetary nutation.  These total
11096     *     nutations can be used in combination with an existing IAU 1976
11097     *     precession implementation, such as jauPmat76,  to deliver GCRS-
11098     *     to-true predictions of sub-mas accuracy at current dates.
11099     *     However, there are three shortcomings in the MHB2000 model that
11100     *     must be taken into account if more accurate or definitive results
11101     *     are required (see Wallace 2002):
11102     *
11103     *       (i) The MHB2000 total nutations are simply arithmetic sums,
11104     *           yet in reality the various components are successive Euler
11105     *           rotations.  This slight lack of rigor leads to cross terms
11106     *           that exceed 1 mas after a century.  The rigorous procedure
11107     *           is to form the GCRS-to-true rotation matrix by applying the
11108     *           bias, precession and nutation in that order.
11109     *
11110     *      (ii) Although the precession adjustments are stated to be with
11111     *           respect to Lieske et al. (1977), the MHB2000 model does
11112     *           not specify which set of Euler angles are to be used and
11113     *           how the adjustments are to be applied.  The most literal
11114     *           and straightforward procedure is to adopt the 4-rotation
11115     *           epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR
11116     *           to psi_A and DEPSPR to both omega_A and eps_A.
11117     *
11118     *     (iii) The MHB2000 model predates the determination by Chapront
11119     *           et al. (2002) of a 14.6 mas displacement between the
11120     *           J2000.0 mean equinox and the origin of the ICRS frame.  It
11121     *           should, however, be noted that neglecting this displacement
11122     *           when calculating star coordinates does not lead to a
11123     *           14.6 mas change in right ascension, only a small second-
11124     *           order distortion in the pattern of the precession-nutation
11125     *           effect.
11126     *
11127     *     For these reasons, the JSOFA functions do not generate the "total
11128     *     nutations" directly, though they can of course easily be
11129     *     generated by calling jauBi00, jauPr00 and the present function
11130     *     and adding the results.
11131     *
11132     * <li> The MHB2000 model contains 41 instances where the same frequency
11133     *     appears multiple times, of which 38 are duplicates and three are
11134     *     triplicates.  To keep the present code close to the original MHB
11135     *     algorithm, this small inefficiency has not been corrected.
11136     *</ol>
11137     *<p>Called:<ul>
11138     *     <li>{@link #jauFal03} mean anomaly of the Moon
11139     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
11140     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
11141     *     <li>{@link #jauFame03} mean longitude of Mercury
11142     *     <li>{@link #jauFave03} mean longitude of Venus
11143     *     <li>{@link #jauFae03} mean longitude of Earth
11144     *     <li>{@link #jauFama03} mean longitude of Mars
11145     *     <li>{@link #jauFaju03} mean longitude of Jupiter
11146     *     <li>{@link #jauFasa03} mean longitude of Saturn
11147     *     <li>{@link #jauFaur03} mean longitude of Uranus
11148     *     <li>{@link #jauFapa03} general accumulated precession in longitude
11149     * </ul>
11150     *<p>References:
11151     *
11152     *     <p>Chapront, J., Chapront-Touze, M. &amp; Francou, G. 2002,
11153     *     Astron.Astrophys. 387, 700
11154     *
11155     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
11156     *     Astron.Astrophys. 58, 1-16
11157     *
11158     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
11159     *     107, B4.  The MHB_2000 code itself was obtained on 9th September
11160     *     2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
11161     *
11162     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
11163     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
11164     *
11165     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
11166     *     Astron.Astrophys.Supp.Ser. 135, 111
11167     *
11168     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
11169     *     Resolutions", in IERS Workshop 5.1 (2002)
11170     *
11171     *@version 2009 December 17
11172     *
11173     *  @since Release 20101201
11174     *
11175     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
11176     */
11177     public static NutationTerms jauNut00a(double date1, double date2 )
11178     {
11179        int i;
11180        double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
11181               al, af, ad, aom, alme, alve, alea, alma,
11182               alju, alsa, alur, alne, apa, dpsils, depsls,
11183               dpsipl, depspl;
11184 
11185     /* Units of 0.1 microarcsecond to radians */
11186        final double U2R = DAS2R / 1e7;
11187 
11188     /* ------------------------- */
11189     /* Luni-Solar nutation model */
11190     /* ------------------------- */
11191 
11192     /* The units for the sine and cosine coefficients are */
11193     /* 0.1 microarcsecond and the same per Julian century */
11194 
11195        final class NutationModel {
11196           int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
11197           double sp,spt,cp;     /* longitude sin, t*sin, cos coefficients */
11198           double ce,cet,se;     /* obliquity cos, t*cos, sin coefficients */
11199           public NutationModel(int nl,int nlp,int nf,int nd, int nom,
11200           double sp,double spt,double cp,     
11201           double ce,double cet,double se ) {
11202            this.nl = nl;
11203            this.nlp = nlp;
11204            this.nf = nf;
11205            this.nd = nd;
11206            this.nom = nom;
11207            this.sp = sp;
11208            this.spt = spt;
11209            this.cp = cp;
11210            this.ce = ce;
11211            this.cet = cet;
11212            this.se = se;
11213         }
11214        }
11215        
11216        NutationModel xls[] = {
11217 
11218        /* 1- 10 */
11219           new NutationModel( 0, 0, 0, 0, 1,
11220              -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
11221           new NutationModel( 0, 0, 2,-2, 2,
11222                -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
11223           new NutationModel( 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0),
11224           new NutationModel( 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0),
11225           new NutationModel( 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0),
11226           new NutationModel( 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0),
11227           new NutationModel( 1, 0, 0, 0, 0, 711159.0,  73.0, -872.0,  -6750.0,  0.0,  358.0),
11228           new NutationModel( 0, 0, 2, 0, 1,-387298.0,-367.0,  380.0, 200728.0, 18.0,  318.0),
11229           new NutationModel( 1, 0, 2, 0, 2,-301461.0, -36.0,  816.0, 129025.0,-63.0,  367.0),
11230           new NutationModel( 0,-1, 2,-2, 2, 215829.0,-494.0,  111.0, -95929.0,299.0,  132.0),
11231 
11232        /* 11-20 */
11233           new NutationModel( 0, 0, 2,-2, 1, 128227.0, 137.0,  181.0, -68982.0, -9.0,   39.0),
11234           new NutationModel(-1, 0, 2, 0, 2, 123457.0,  11.0,   19.0, -53311.0, 32.0,   -4.0),
11235           new NutationModel(-1, 0, 0, 2, 0, 156994.0,  10.0, -168.0,  -1235.0,  0.0,   82.0),
11236           new NutationModel( 1, 0, 0, 0, 1,  63110.0,  63.0,   27.0, -33228.0,  0.0,   -9.0),
11237           new NutationModel(-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0,  31429.0,  0.0,  -75.0),
11238           new NutationModel(-1, 0, 2, 2, 2, -59641.0, -11.0,  149.0,  25543.0,-11.0,   66.0),
11239           new NutationModel( 1, 0, 2, 0, 1, -51613.0, -42.0,  129.0,  26366.0,  0.0,   78.0),
11240           new NutationModel(-2, 0, 2, 0, 1,  45893.0,  50.0,   31.0, -24236.0,-10.0,   20.0),
11241           new NutationModel( 0, 0, 0, 2, 0,  63384.0,  11.0, -150.0,  -1220.0,  0.0,   29.0),
11242           new NutationModel( 0, 0, 2, 2, 2, -38571.0,  -1.0,  158.0,  16452.0,-11.0,   68.0),
11243 
11244        /* 21-30 */
11245           new NutationModel( 0,-2, 2,-2, 2,  32481.0,   0.0,    0.0, -13870.0,  0.0,    0.0),
11246           new NutationModel(-2, 0, 0, 2, 0, -47722.0,   0.0,  -18.0,    477.0,  0.0,  -25.0),
11247           new NutationModel( 2, 0, 2, 0, 2, -31046.0,  -1.0,  131.0,  13238.0,-11.0,   59.0),
11248           new NutationModel( 1, 0, 2,-2, 2,  28593.0,   0.0,   -1.0, -12338.0, 10.0,   -3.0),
11249           new NutationModel(-1, 0, 2, 0, 1,  20441.0,  21.0,   10.0, -10758.0,  0.0,   -3.0),
11250           new NutationModel( 2, 0, 0, 0, 0,  29243.0,   0.0,  -74.0,   -609.0,  0.0,   13.0),
11251           new NutationModel( 0, 0, 2, 0, 0,  25887.0,   0.0,  -66.0,   -550.0,  0.0,   11.0),
11252           new NutationModel( 0, 1, 0, 0, 1, -14053.0, -25.0,   79.0,   8551.0, -2.0,  -45.0),
11253           new NutationModel(-1, 0, 0, 2, 1,  15164.0,  10.0,   11.0,  -8001.0,  0.0,   -1.0),
11254           new NutationModel( 0, 2, 2,-2, 2, -15794.0,  72.0,  -16.0,   6850.0,-42.0,   -5.0),
11255 
11256        /* 31-40 */
11257           new NutationModel( 0, 0,-2, 2, 0,  21783.0,   0.0,   13.0,   -167.0,  0.0,   13.0),
11258           new NutationModel( 1, 0, 0,-2, 1, -12873.0, -10.0,  -37.0,   6953.0,  0.0,  -14.0),
11259           new NutationModel( 0,-1, 0, 0, 1, -12654.0,  11.0,   63.0,   6415.0,  0.0,   26.0),
11260           new NutationModel(-1, 0, 2, 2, 1, -10204.0,   0.0,   25.0,   5222.0,  0.0,   15.0),
11261           new NutationModel( 0, 2, 0, 0, 0,  16707.0, -85.0,  -10.0,    168.0, -1.0,   10.0),
11262           new NutationModel( 1, 0, 2, 2, 2,  -7691.0,   0.0,   44.0,   3268.0,  0.0,   19.0),
11263           new NutationModel(-2, 0, 2, 0, 0, -11024.0,   0.0,  -14.0,    104.0,  0.0,    2.0),
11264           new NutationModel( 0, 1, 2, 0, 2,   7566.0, -21.0,  -11.0,  -3250.0,  0.0,   -5.0),
11265           new NutationModel( 0, 0, 2, 2, 1,  -6637.0, -11.0,   25.0,   3353.0,  0.0,   14.0),
11266           new NutationModel( 0,-1, 2, 0, 2,  -7141.0,  21.0,    8.0,   3070.0,  0.0,    4.0),
11267 
11268        /* 41-50 */
11269           new NutationModel( 0, 0, 0, 2, 1,  -6302.0, -11.0,    2.0,   3272.0,  0.0,    4.0),
11270           new NutationModel( 1, 0, 2,-2, 1,   5800.0,  10.0,    2.0,  -3045.0,  0.0,   -1.0),
11271           new NutationModel( 2, 0, 2,-2, 2,   6443.0,   0.0,   -7.0,  -2768.0,  0.0,   -4.0),
11272           new NutationModel(-2, 0, 0, 2, 1,  -5774.0, -11.0,  -15.0,   3041.0,  0.0,   -5.0),
11273           new NutationModel( 2, 0, 2, 0, 1,  -5350.0,   0.0,   21.0,   2695.0,  0.0,   12.0),
11274           new NutationModel( 0,-1, 2,-2, 1,  -4752.0, -11.0,   -3.0,   2719.0,  0.0,   -3.0),
11275           new NutationModel( 0, 0, 0,-2, 1,  -4940.0, -11.0,  -21.0,   2720.0,  0.0,   -9.0),
11276           new NutationModel(-1,-1, 0, 2, 0,   7350.0,   0.0,   -8.0,    -51.0,  0.0,    4.0),
11277           new NutationModel( 2, 0, 0,-2, 1,   4065.0,   0.0,    6.0,  -2206.0,  0.0,    1.0),
11278           new NutationModel( 1, 0, 0, 2, 0,   6579.0,   0.0,  -24.0,   -199.0,  0.0,    2.0),
11279 
11280        /* 51-60 */
11281           new NutationModel( 0, 1, 2,-2, 1,   3579.0,   0.0,    5.0,  -1900.0,  0.0,    1.0),
11282           new NutationModel( 1,-1, 0, 0, 0,   4725.0,   0.0,   -6.0,    -41.0,  0.0,    3.0),
11283           new NutationModel(-2, 0, 2, 0, 2,  -3075.0,   0.0,   -2.0,   1313.0,  0.0,   -1.0),
11284           new NutationModel( 3, 0, 2, 0, 2,  -2904.0,   0.0,   15.0,   1233.0,  0.0,    7.0),
11285           new NutationModel( 0,-1, 0, 2, 0,   4348.0,   0.0,  -10.0,    -81.0,  0.0,    2.0),
11286           new NutationModel( 1,-1, 2, 0, 2,  -2878.0,   0.0,    8.0,   1232.0,  0.0,    4.0),
11287           new NutationModel( 0, 0, 0, 1, 0,  -4230.0,   0.0,    5.0,    -20.0,  0.0,   -2.0),
11288           new NutationModel(-1,-1, 2, 2, 2,  -2819.0,   0.0,    7.0,   1207.0,  0.0,    3.0),
11289           new NutationModel(-1, 0, 2, 0, 0,  -4056.0,   0.0,    5.0,     40.0,  0.0,   -2.0),
11290           new NutationModel( 0,-1, 2, 2, 2,  -2647.0,   0.0,   11.0,   1129.0,  0.0,    5.0),
11291 
11292        /* 61-70 */
11293           new NutationModel(-2, 0, 0, 0, 1,  -2294.0,   0.0,  -10.0,   1266.0,  0.0,   -4.0),
11294           new NutationModel( 1, 1, 2, 0, 2,   2481.0,   0.0,   -7.0,  -1062.0,  0.0,   -3.0),
11295           new NutationModel( 2, 0, 0, 0, 1,   2179.0,   0.0,   -2.0,  -1129.0,  0.0,   -2.0),
11296           new NutationModel(-1, 1, 0, 1, 0,   3276.0,   0.0,    1.0,     -9.0,  0.0,    0.0),
11297           new NutationModel( 1, 1, 0, 0, 0,  -3389.0,   0.0,    5.0,     35.0,  0.0,   -2.0),
11298           new NutationModel( 1, 0, 2, 0, 0,   3339.0,   0.0,  -13.0,   -107.0,  0.0,    1.0),
11299           new NutationModel(-1, 0, 2,-2, 1,  -1987.0,   0.0,   -6.0,   1073.0,  0.0,   -2.0),
11300           new NutationModel( 1, 0, 0, 0, 2,  -1981.0,   0.0,    0.0,    854.0,  0.0,    0.0),
11301           new NutationModel(-1, 0, 0, 1, 0,   4026.0,   0.0, -353.0,   -553.0,  0.0, -139.0),
11302           new NutationModel( 0, 0, 2, 1, 2,   1660.0,   0.0,   -5.0,   -710.0,  0.0,   -2.0),
11303 
11304        /* 71-80 */
11305           new NutationModel(-1, 0, 2, 4, 2,  -1521.0,   0.0,    9.0,    647.0,  0.0,    4.0),
11306           new NutationModel(-1, 1, 0, 1, 1,   1314.0,   0.0,    0.0,   -700.0,  0.0,    0.0),
11307           new NutationModel( 0,-2, 2,-2, 1,  -1283.0,   0.0,    0.0,    672.0,  0.0,    0.0),
11308           new NutationModel( 1, 0, 2, 2, 1,  -1331.0,   0.0,    8.0,    663.0,  0.0,    4.0),
11309           new NutationModel(-2, 0, 2, 2, 2,   1383.0,   0.0,   -2.0,   -594.0,  0.0,   -2.0),
11310           new NutationModel(-1, 0, 0, 0, 2,   1405.0,   0.0,    4.0,   -610.0,  0.0,    2.0),
11311           new NutationModel( 1, 1, 2,-2, 2,   1290.0,   0.0,    0.0,   -556.0,  0.0,    0.0),
11312           new NutationModel(-2, 0, 2, 4, 2,  -1214.0,   0.0,    5.0,    518.0,  0.0,    2.0),
11313           new NutationModel(-1, 0, 4, 0, 2,   1146.0,   0.0,   -3.0,   -490.0,  0.0,   -1.0),
11314           new NutationModel( 2, 0, 2,-2, 1,   1019.0,   0.0,   -1.0,   -527.0,  0.0,   -1.0),
11315 
11316        /* 81-90 */
11317           new NutationModel( 2, 0, 2, 2, 2,  -1100.0,   0.0,    9.0,    465.0,  0.0,    4.0),
11318           new NutationModel( 1, 0, 0, 2, 1,   -970.0,   0.0,    2.0,    496.0,  0.0,    1.0),
11319           new NutationModel( 3, 0, 0, 0, 0,   1575.0,   0.0,   -6.0,    -50.0,  0.0,    0.0),
11320           new NutationModel( 3, 0, 2,-2, 2,    934.0,   0.0,   -3.0,   -399.0,  0.0,   -1.0),
11321           new NutationModel( 0, 0, 4,-2, 2,    922.0,   0.0,   -1.0,   -395.0,  0.0,   -1.0),
11322           new NutationModel( 0, 1, 2, 0, 1,    815.0,   0.0,   -1.0,   -422.0,  0.0,   -1.0),
11323           new NutationModel( 0, 0,-2, 2, 1,    834.0,   0.0,    2.0,   -440.0,  0.0,    1.0),
11324           new NutationModel( 0, 0, 2,-2, 3,   1248.0,   0.0,    0.0,   -170.0,  0.0,    1.0),
11325           new NutationModel(-1, 0, 0, 4, 0,   1338.0,   0.0,   -5.0,    -39.0,  0.0,    0.0),
11326           new NutationModel( 2, 0,-2, 0, 1,    716.0,   0.0,   -2.0,   -389.0,  0.0,   -1.0),
11327 
11328        /* 91-100 */
11329           new NutationModel(-2, 0, 0, 4, 0,   1282.0,   0.0,   -3.0,    -23.0,  0.0,    1.0),
11330           new NutationModel(-1,-1, 0, 2, 1,    742.0,   0.0,    1.0,   -391.0,  0.0,    0.0),
11331           new NutationModel(-1, 0, 0, 1, 1,   1020.0,   0.0,  -25.0,   -495.0,  0.0,  -10.0),
11332           new NutationModel( 0, 1, 0, 0, 2,    715.0,   0.0,   -4.0,   -326.0,  0.0,    2.0),
11333           new NutationModel( 0, 0,-2, 0, 1,   -666.0,   0.0,   -3.0,    369.0,  0.0,   -1.0),
11334           new NutationModel( 0,-1, 2, 0, 1,   -667.0,   0.0,    1.0,    346.0,  0.0,    1.0),
11335           new NutationModel( 0, 0, 2,-1, 2,   -704.0,   0.0,    0.0,    304.0,  0.0,    0.0),
11336           new NutationModel( 0, 0, 2, 4, 2,   -694.0,   0.0,    5.0,    294.0,  0.0,    2.0),
11337           new NutationModel(-2,-1, 0, 2, 0,  -1014.0,   0.0,   -1.0,      4.0,  0.0,   -1.0),
11338           new NutationModel( 1, 1, 0,-2, 1,   -585.0,   0.0,   -2.0,    316.0,  0.0,   -1.0),
11339 
11340        /* 101-110 */
11341           new NutationModel(-1, 1, 0, 2, 0,   -949.0,   0.0,    1.0,      8.0,  0.0,   -1.0),
11342           new NutationModel(-1, 1, 0, 1, 2,   -595.0,   0.0,    0.0,    258.0,  0.0,    0.0),
11343           new NutationModel( 1,-1, 0, 0, 1,    528.0,   0.0,    0.0,   -279.0,  0.0,    0.0),
11344           new NutationModel( 1,-1, 2, 2, 2,   -590.0,   0.0,    4.0,    252.0,  0.0,    2.0),
11345           new NutationModel(-1, 1, 2, 2, 2,    570.0,   0.0,   -2.0,   -244.0,  0.0,   -1.0),
11346           new NutationModel( 3, 0, 2, 0, 1,   -502.0,   0.0,    3.0,    250.0,  0.0,    2.0),
11347           new NutationModel( 0, 1,-2, 2, 0,   -875.0,   0.0,    1.0,     29.0,  0.0,    0.0),
11348           new NutationModel(-1, 0, 0,-2, 1,   -492.0,   0.0,   -3.0,    275.0,  0.0,   -1.0),
11349           new NutationModel( 0, 1, 2, 2, 2,    535.0,   0.0,   -2.0,   -228.0,  0.0,   -1.0),
11350           new NutationModel(-1,-1, 2, 2, 1,   -467.0,   0.0,    1.0,    240.0,  0.0,    1.0),
11351 
11352        /* 111-120 */
11353           new NutationModel( 0,-1, 0, 0, 2,    591.0,   0.0,    0.0,   -253.0,  0.0,    0.0),
11354           new NutationModel( 1, 0, 2,-4, 1,   -453.0,   0.0,   -1.0,    244.0,  0.0,   -1.0),
11355           new NutationModel(-1, 0,-2, 2, 0,    766.0,   0.0,    1.0,      9.0,  0.0,    0.0),
11356           new NutationModel( 0,-1, 2, 2, 1,   -446.0,   0.0,    2.0,    225.0,  0.0,    1.0),
11357           new NutationModel( 2,-1, 2, 0, 2,   -488.0,   0.0,    2.0,    207.0,  0.0,    1.0),
11358           new NutationModel( 0, 0, 0, 2, 2,   -468.0,   0.0,    0.0,    201.0,  0.0,    0.0),
11359           new NutationModel( 1,-1, 2, 0, 1,   -421.0,   0.0,    1.0,    216.0,  0.0,    1.0),
11360           new NutationModel(-1, 1, 2, 0, 2,    463.0,   0.0,    0.0,   -200.0,  0.0,    0.0),
11361           new NutationModel( 0, 1, 0, 2, 0,   -673.0,   0.0,    2.0,     14.0,  0.0,    0.0),
11362           new NutationModel( 0,-1,-2, 2, 0,    658.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11363 
11364        /* 121-130 */
11365           new NutationModel( 0, 3, 2,-2, 2,   -438.0,   0.0,    0.0,    188.0,  0.0,    0.0),
11366           new NutationModel( 0, 0, 0, 1, 1,   -390.0,   0.0,    0.0,    205.0,  0.0,    0.0),
11367           new NutationModel(-1, 0, 2, 2, 0,    639.0, -11.0,   -2.0,    -19.0,  0.0,    0.0),
11368           new NutationModel( 2, 1, 2, 0, 2,    412.0,   0.0,   -2.0,   -176.0,  0.0,   -1.0),
11369           new NutationModel( 1, 1, 0, 0, 1,   -361.0,   0.0,    0.0,    189.0,  0.0,    0.0),
11370           new NutationModel( 1, 1, 2, 0, 1,    360.0,   0.0,   -1.0,   -185.0,  0.0,   -1.0),
11371           new NutationModel( 2, 0, 0, 2, 0,    588.0,   0.0,   -3.0,    -24.0,  0.0,    0.0),
11372           new NutationModel( 1, 0,-2, 2, 0,   -578.0,   0.0,    1.0,      5.0,  0.0,    0.0),
11373           new NutationModel(-1, 0, 0, 2, 2,   -396.0,   0.0,    0.0,    171.0,  0.0,    0.0),
11374           new NutationModel( 0, 1, 0, 1, 0,    565.0,   0.0,   -1.0,     -6.0,  0.0,    0.0),
11375 
11376        /* 131-140 */
11377           new NutationModel( 0, 1, 0,-2, 1,   -335.0,   0.0,   -1.0,    184.0,  0.0,   -1.0),
11378           new NutationModel(-1, 0, 2,-2, 2,    357.0,   0.0,    1.0,   -154.0,  0.0,    0.0),
11379           new NutationModel( 0, 0, 0,-1, 1,    321.0,   0.0,    1.0,   -174.0,  0.0,    0.0),
11380           new NutationModel(-1, 1, 0, 0, 1,   -301.0,   0.0,   -1.0,    162.0,  0.0,    0.0),
11381           new NutationModel( 1, 0, 2,-1, 2,   -334.0,   0.0,    0.0,    144.0,  0.0,    0.0),
11382           new NutationModel( 1,-1, 0, 2, 0,    493.0,   0.0,   -2.0,    -15.0,  0.0,    0.0),
11383           new NutationModel( 0, 0, 0, 4, 0,    494.0,   0.0,   -2.0,    -19.0,  0.0,    0.0),
11384           new NutationModel( 1, 0, 2, 1, 2,    337.0,   0.0,   -1.0,   -143.0,  0.0,   -1.0),
11385           new NutationModel( 0, 0, 2, 1, 1,    280.0,   0.0,   -1.0,   -144.0,  0.0,    0.0),
11386           new NutationModel( 1, 0, 0,-2, 2,    309.0,   0.0,    1.0,   -134.0,  0.0,    0.0),
11387 
11388        /* 141-150 */
11389           new NutationModel(-1, 0, 2, 4, 1,   -263.0,   0.0,    2.0,    131.0,  0.0,    1.0),
11390           new NutationModel( 1, 0,-2, 0, 1,    253.0,   0.0,    1.0,   -138.0,  0.0,    0.0),
11391           new NutationModel( 1, 1, 2,-2, 1,    245.0,   0.0,    0.0,   -128.0,  0.0,    0.0),
11392           new NutationModel( 0, 0, 2, 2, 0,    416.0,   0.0,   -2.0,    -17.0,  0.0,    0.0),
11393           new NutationModel(-1, 0, 2,-1, 1,   -229.0,   0.0,    0.0,    128.0,  0.0,    0.0),
11394           new NutationModel(-2, 0, 2, 2, 1,    231.0,   0.0,    0.0,   -120.0,  0.0,    0.0),
11395           new NutationModel( 4, 0, 2, 0, 2,   -259.0,   0.0,    2.0,    109.0,  0.0,    1.0),
11396           new NutationModel( 2,-1, 0, 0, 0,    375.0,   0.0,   -1.0,     -8.0,  0.0,    0.0),
11397           new NutationModel( 2, 1, 2,-2, 2,    252.0,   0.0,    0.0,   -108.0,  0.0,    0.0),
11398           new NutationModel( 0, 1, 2, 1, 2,   -245.0,   0.0,    1.0,    104.0,  0.0,    0.0),
11399 
11400        /* 151-160 */
11401           new NutationModel( 1, 0, 4,-2, 2,    243.0,   0.0,   -1.0,   -104.0,  0.0,    0.0),
11402           new NutationModel(-1,-1, 0, 0, 1,    208.0,   0.0,    1.0,   -112.0,  0.0,    0.0),
11403           new NutationModel( 0, 1, 0, 2, 1,    199.0,   0.0,    0.0,   -102.0,  0.0,    0.0),
11404           new NutationModel(-2, 0, 2, 4, 1,   -208.0,   0.0,    1.0,    105.0,  0.0,    0.0),
11405           new NutationModel( 2, 0, 2, 0, 0,    335.0,   0.0,   -2.0,    -14.0,  0.0,    0.0),
11406           new NutationModel( 1, 0, 0, 1, 0,   -325.0,   0.0,    1.0,      7.0,  0.0,    0.0),
11407           new NutationModel(-1, 0, 0, 4, 1,   -187.0,   0.0,    0.0,     96.0,  0.0,    0.0),
11408           new NutationModel(-1, 0, 4, 0, 1,    197.0,   0.0,   -1.0,   -100.0,  0.0,    0.0),
11409           new NutationModel( 2, 0, 2, 2, 1,   -192.0,   0.0,    2.0,     94.0,  0.0,    1.0),
11410           new NutationModel( 0, 0, 2,-3, 2,   -188.0,   0.0,    0.0,     83.0,  0.0,    0.0),
11411 
11412        /* 161-170 */
11413           new NutationModel(-1,-2, 0, 2, 0,    276.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11414           new NutationModel( 2, 1, 0, 0, 0,   -286.0,   0.0,    1.0,      6.0,  0.0,    0.0),
11415           new NutationModel( 0, 0, 4, 0, 2,    186.0,   0.0,   -1.0,    -79.0,  0.0,    0.0),
11416           new NutationModel( 0, 0, 0, 0, 3,   -219.0,   0.0,    0.0,     43.0,  0.0,    0.0),
11417           new NutationModel( 0, 3, 0, 0, 0,    276.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11418           new NutationModel( 0, 0, 2,-4, 1,   -153.0,   0.0,   -1.0,     84.0,  0.0,    0.0),
11419           new NutationModel( 0,-1, 0, 2, 1,   -156.0,   0.0,    0.0,     81.0,  0.0,    0.0),
11420           new NutationModel( 0, 0, 0, 4, 1,   -154.0,   0.0,    1.0,     78.0,  0.0,    0.0),
11421           new NutationModel(-1,-1, 2, 4, 2,   -174.0,   0.0,    1.0,     75.0,  0.0,    0.0),
11422           new NutationModel( 1, 0, 2, 4, 2,   -163.0,   0.0,    2.0,     69.0,  0.0,    1.0),
11423 
11424        /* 171-180 */
11425           new NutationModel(-2, 2, 0, 2, 0,   -228.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11426           new NutationModel(-2,-1, 2, 0, 1,     91.0,   0.0,   -4.0,    -54.0,  0.0,   -2.0),
11427           new NutationModel(-2, 0, 0, 2, 2,    175.0,   0.0,    0.0,    -75.0,  0.0,    0.0),
11428           new NutationModel(-1,-1, 2, 0, 2,   -159.0,   0.0,    0.0,     69.0,  0.0,    0.0),
11429           new NutationModel( 0, 0, 4,-2, 1,    141.0,   0.0,    0.0,    -72.0,  0.0,    0.0),
11430           new NutationModel( 3, 0, 2,-2, 1,    147.0,   0.0,    0.0,    -75.0,  0.0,    0.0),
11431           new NutationModel(-2,-1, 0, 2, 1,   -132.0,   0.0,    0.0,     69.0,  0.0,    0.0),
11432           new NutationModel( 1, 0, 0,-1, 1,    159.0,   0.0,  -28.0,    -54.0,  0.0,   11.0),
11433           new NutationModel( 0,-2, 0, 2, 0,    213.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11434           new NutationModel(-2, 0, 0, 4, 1,    123.0,   0.0,    0.0,    -64.0,  0.0,    0.0),
11435 
11436        /* 181-190 */
11437           new NutationModel(-3, 0, 0, 0, 1,   -118.0,   0.0,   -1.0,     66.0,  0.0,    0.0),
11438           new NutationModel( 1, 1, 2, 2, 2,    144.0,   0.0,   -1.0,    -61.0,  0.0,    0.0),
11439           new NutationModel( 0, 0, 2, 4, 1,   -121.0,   0.0,    1.0,     60.0,  0.0,    0.0),
11440           new NutationModel( 3, 0, 2, 2, 2,   -134.0,   0.0,    1.0,     56.0,  0.0,    1.0),
11441           new NutationModel(-1, 1, 2,-2, 1,   -105.0,   0.0,    0.0,     57.0,  0.0,    0.0),
11442           new NutationModel( 2, 0, 0,-4, 1,   -102.0,   0.0,    0.0,     56.0,  0.0,    0.0),
11443           new NutationModel( 0, 0, 0,-2, 2,    120.0,   0.0,    0.0,    -52.0,  0.0,    0.0),
11444           new NutationModel( 2, 0, 2,-4, 1,    101.0,   0.0,    0.0,    -54.0,  0.0,    0.0),
11445           new NutationModel(-1, 1, 0, 2, 1,   -113.0,   0.0,    0.0,     59.0,  0.0,    0.0),
11446           new NutationModel( 0, 0, 2,-1, 1,   -106.0,   0.0,    0.0,     61.0,  0.0,    0.0),
11447 
11448        /* 191-200 */
11449           new NutationModel( 0,-2, 2, 2, 2,   -129.0,   0.0,    1.0,     55.0,  0.0,    0.0),
11450           new NutationModel( 2, 0, 0, 2, 1,   -114.0,   0.0,    0.0,     57.0,  0.0,    0.0),
11451           new NutationModel( 4, 0, 2,-2, 2,    113.0,   0.0,   -1.0,    -49.0,  0.0,    0.0),
11452           new NutationModel( 2, 0, 0,-2, 2,   -102.0,   0.0,    0.0,     44.0,  0.0,    0.0),
11453           new NutationModel( 0, 2, 0, 0, 1,    -94.0,   0.0,    0.0,     51.0,  0.0,    0.0),
11454           new NutationModel( 1, 0, 0,-4, 1,   -100.0,   0.0,   -1.0,     56.0,  0.0,    0.0),
11455           new NutationModel( 0, 2, 2,-2, 1,     87.0,   0.0,    0.0,    -47.0,  0.0,    0.0),
11456           new NutationModel(-3, 0, 0, 4, 0,    161.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11457           new NutationModel(-1, 1, 2, 0, 1,     96.0,   0.0,    0.0,    -50.0,  0.0,    0.0),
11458           new NutationModel(-1,-1, 0, 4, 0,    151.0,   0.0,   -1.0,     -5.0,  0.0,    0.0),
11459 
11460        /* 201-210 */
11461           new NutationModel(-1,-2, 2, 2, 2,   -104.0,   0.0,    0.0,     44.0,  0.0,    0.0),
11462           new NutationModel(-2,-1, 2, 4, 2,   -110.0,   0.0,    0.0,     48.0,  0.0,    0.0),
11463           new NutationModel( 1,-1, 2, 2, 1,   -100.0,   0.0,    1.0,     50.0,  0.0,    0.0),
11464           new NutationModel(-2, 1, 0, 2, 0,     92.0,   0.0,   -5.0,     12.0,  0.0,   -2.0),
11465           new NutationModel(-2, 1, 2, 0, 1,     82.0,   0.0,    0.0,    -45.0,  0.0,    0.0),
11466           new NutationModel( 2, 1, 0,-2, 1,     82.0,   0.0,    0.0,    -45.0,  0.0,    0.0),
11467           new NutationModel(-3, 0, 2, 0, 1,    -78.0,   0.0,    0.0,     41.0,  0.0,    0.0),
11468           new NutationModel(-2, 0, 2,-2, 1,    -77.0,   0.0,    0.0,     43.0,  0.0,    0.0),
11469           new NutationModel(-1, 1, 0, 2, 2,      2.0,   0.0,    0.0,     54.0,  0.0,    0.0),
11470           new NutationModel( 0,-1, 2,-1, 2,     94.0,   0.0,    0.0,    -40.0,  0.0,    0.0),
11471 
11472        /* 211-220 */
11473           new NutationModel(-1, 0, 4,-2, 2,    -93.0,   0.0,    0.0,     40.0,  0.0,    0.0),
11474           new NutationModel( 0,-2, 2, 0, 2,    -83.0,   0.0,   10.0,     40.0,  0.0,   -2.0),
11475           new NutationModel(-1, 0, 2, 1, 2,     83.0,   0.0,    0.0,    -36.0,  0.0,    0.0),
11476           new NutationModel( 2, 0, 0, 0, 2,    -91.0,   0.0,    0.0,     39.0,  0.0,    0.0),
11477           new NutationModel( 0, 0, 2, 0, 3,    128.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11478           new NutationModel(-2, 0, 4, 0, 2,    -79.0,   0.0,    0.0,     34.0,  0.0,    0.0),
11479           new NutationModel(-1, 0,-2, 0, 1,    -83.0,   0.0,    0.0,     47.0,  0.0,    0.0),
11480           new NutationModel(-1, 1, 2, 2, 1,     84.0,   0.0,    0.0,    -44.0,  0.0,    0.0),
11481           new NutationModel( 3, 0, 0, 0, 1,     83.0,   0.0,    0.0,    -43.0,  0.0,    0.0),
11482           new NutationModel(-1, 0, 2, 3, 2,     91.0,   0.0,    0.0,    -39.0,  0.0,    0.0),
11483 
11484        /* 221-230 */
11485           new NutationModel( 2,-1, 2, 0, 1,    -77.0,   0.0,    0.0,     39.0,  0.0,    0.0),
11486           new NutationModel( 0, 1, 2, 2, 1,     84.0,   0.0,    0.0,    -43.0,  0.0,    0.0),
11487           new NutationModel( 0,-1, 2, 4, 2,    -92.0,   0.0,    1.0,     39.0,  0.0,    0.0),
11488           new NutationModel( 2,-1, 2, 2, 2,    -92.0,   0.0,    1.0,     39.0,  0.0,    0.0),
11489           new NutationModel( 0, 2,-2, 2, 0,    -94.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11490           new NutationModel(-1,-1, 2,-1, 1,     68.0,   0.0,    0.0,    -36.0,  0.0,    0.0),
11491           new NutationModel( 0,-2, 0, 0, 1,    -61.0,   0.0,    0.0,     32.0,  0.0,    0.0),
11492           new NutationModel( 1, 0, 2,-4, 2,     71.0,   0.0,    0.0,    -31.0,  0.0,    0.0),
11493           new NutationModel( 1,-1, 0,-2, 1,     62.0,   0.0,    0.0,    -34.0,  0.0,    0.0),
11494           new NutationModel(-1,-1, 2, 0, 1,    -63.0,   0.0,    0.0,     33.0,  0.0,    0.0),
11495 
11496        /* 231-240 */
11497           new NutationModel( 1,-1, 2,-2, 2,    -73.0,   0.0,    0.0,     32.0,  0.0,    0.0),
11498           new NutationModel(-2,-1, 0, 4, 0,    115.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11499           new NutationModel(-1, 0, 0, 3, 0,   -103.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11500           new NutationModel(-2,-1, 2, 2, 2,     63.0,   0.0,    0.0,    -28.0,  0.0,    0.0),
11501           new NutationModel( 0, 2, 2, 0, 2,     74.0,   0.0,    0.0,    -32.0,  0.0,    0.0),
11502           new NutationModel( 1, 1, 0, 2, 0,   -103.0,   0.0,   -3.0,      3.0,  0.0,   -1.0),
11503           new NutationModel( 2, 0, 2,-1, 2,    -69.0,   0.0,    0.0,     30.0,  0.0,    0.0),
11504           new NutationModel( 1, 0, 2, 1, 1,     57.0,   0.0,    0.0,    -29.0,  0.0,    0.0),
11505           new NutationModel( 4, 0, 0, 0, 0,     94.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11506           new NutationModel( 2, 1, 2, 0, 1,     64.0,   0.0,    0.0,    -33.0,  0.0,    0.0),
11507 
11508        /* 241-250 */
11509           new NutationModel( 3,-1, 2, 0, 2,    -63.0,   0.0,    0.0,     26.0,  0.0,    0.0),
11510           new NutationModel(-2, 2, 0, 2, 1,    -38.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11511           new NutationModel( 1, 0, 2,-3, 1,    -43.0,   0.0,    0.0,     24.0,  0.0,    0.0),
11512           new NutationModel( 1, 1, 2,-4, 1,    -45.0,   0.0,    0.0,     23.0,  0.0,    0.0),
11513           new NutationModel(-1,-1, 2,-2, 1,     47.0,   0.0,    0.0,    -24.0,  0.0,    0.0),
11514           new NutationModel( 0,-1, 0,-1, 1,    -48.0,   0.0,    0.0,     25.0,  0.0,    0.0),
11515           new NutationModel( 0,-1, 0,-2, 1,     45.0,   0.0,    0.0,    -26.0,  0.0,    0.0),
11516           new NutationModel(-2, 0, 0, 0, 2,     56.0,   0.0,    0.0,    -25.0,  0.0,    0.0),
11517           new NutationModel(-2, 0,-2, 2, 0,     88.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11518           new NutationModel(-1, 0,-2, 4, 0,    -75.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11519 
11520        /* 251-260 */
11521           new NutationModel( 1,-2, 0, 0, 0,     85.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11522           new NutationModel( 0, 1, 0, 1, 1,     49.0,   0.0,    0.0,    -26.0,  0.0,    0.0),
11523           new NutationModel(-1, 2, 0, 2, 0,    -74.0,   0.0,   -3.0,     -1.0,  0.0,   -1.0),
11524           new NutationModel( 1,-1, 2,-2, 1,    -39.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11525           new NutationModel( 1, 2, 2,-2, 2,     45.0,   0.0,    0.0,    -20.0,  0.0,    0.0),
11526           new NutationModel( 2,-1, 2,-2, 2,     51.0,   0.0,    0.0,    -22.0,  0.0,    0.0),
11527           new NutationModel( 1, 0, 2,-1, 1,    -40.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11528           new NutationModel( 2, 1, 2,-2, 1,     41.0,   0.0,    0.0,    -21.0,  0.0,    0.0),
11529           new NutationModel(-2, 0, 0,-2, 1,    -42.0,   0.0,    0.0,     24.0,  0.0,    0.0),
11530           new NutationModel( 1,-2, 2, 0, 2,    -51.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11531 
11532        /* 261-270 */
11533           new NutationModel( 0, 1, 2, 1, 1,    -42.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11534           new NutationModel( 1, 0, 4,-2, 1,     39.0,   0.0,    0.0,    -21.0,  0.0,    0.0),
11535           new NutationModel(-2, 0, 4, 2, 2,     46.0,   0.0,    0.0,    -18.0,  0.0,    0.0),
11536           new NutationModel( 1, 1, 2, 1, 2,    -53.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11537           new NutationModel( 1, 0, 0, 4, 0,     82.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11538           new NutationModel( 1, 0, 2, 2, 0,     81.0,   0.0,   -1.0,     -4.0,  0.0,    0.0),
11539           new NutationModel( 2, 0, 2, 1, 2,     47.0,   0.0,    0.0,    -19.0,  0.0,    0.0),
11540           new NutationModel( 3, 1, 2, 0, 2,     53.0,   0.0,    0.0,    -23.0,  0.0,    0.0),
11541           new NutationModel( 4, 0, 2, 0, 1,    -45.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11542           new NutationModel(-2,-1, 2, 0, 0,    -44.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11543 
11544        /* 271-280 */
11545           new NutationModel( 0, 1,-2, 2, 1,    -33.0,   0.0,    0.0,     16.0,  0.0,    0.0),
11546           new NutationModel( 1, 0,-2, 1, 0,    -61.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11547           new NutationModel( 0,-1,-2, 2, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11548           new NutationModel( 2,-1, 0,-2, 1,    -38.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11549           new NutationModel(-1, 0, 2,-1, 2,    -33.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11550           new NutationModel( 1, 0, 2,-3, 2,    -60.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11551           new NutationModel( 0, 1, 2,-2, 3,     48.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11552           new NutationModel( 0, 0, 2,-3, 1,     27.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11553           new NutationModel(-1, 0,-2, 2, 1,     38.0,   0.0,    0.0,    -20.0,  0.0,    0.0),
11554           new NutationModel( 0, 0, 2,-4, 2,     31.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11555 
11556        /* 281-290 */
11557           new NutationModel(-2, 1, 0, 0, 1,    -29.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11558           new NutationModel(-1, 0, 0,-1, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11559           new NutationModel( 2, 0, 2,-4, 2,    -32.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11560           new NutationModel( 0, 0, 4,-4, 4,     45.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11561           new NutationModel( 0, 0, 4,-4, 2,    -44.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11562           new NutationModel(-1,-2, 0, 2, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11563           new NutationModel(-2, 0, 0, 3, 0,    -51.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11564           new NutationModel( 1, 0,-2, 2, 1,    -36.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11565           new NutationModel(-3, 0, 2, 2, 2,     44.0,   0.0,    0.0,    -19.0,  0.0,    0.0),
11566           new NutationModel(-3, 0, 2, 2, 1,     26.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11567 
11568        /* 291-300 */
11569           new NutationModel(-2, 0, 2, 2, 0,    -60.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11570           new NutationModel( 2,-1, 0, 0, 1,     35.0,   0.0,    0.0,    -18.0,  0.0,    0.0),
11571           new NutationModel(-2, 1, 2, 2, 2,    -27.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11572           new NutationModel( 1, 1, 0, 1, 0,     47.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11573           new NutationModel( 0, 1, 4,-2, 2,     36.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11574           new NutationModel(-1, 1, 0,-2, 1,    -36.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11575           new NutationModel( 0, 0, 0,-4, 1,    -35.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11576           new NutationModel( 1,-1, 0, 2, 1,    -37.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11577           new NutationModel( 1, 1, 0, 2, 1,     32.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11578           new NutationModel(-1, 2, 2, 2, 2,     35.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11579 
11580        /* 301-310 */
11581           new NutationModel( 3, 1, 2,-2, 2,     32.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11582           new NutationModel( 0,-1, 0, 4, 0,     65.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11583           new NutationModel( 2,-1, 0, 2, 0,     47.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11584           new NutationModel( 0, 0, 4, 0, 1,     32.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11585           new NutationModel( 2, 0, 4,-2, 2,     37.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11586           new NutationModel(-1,-1, 2, 4, 1,    -30.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11587           new NutationModel( 1, 0, 0, 4, 1,    -32.0,   0.0,    0.0,     16.0,  0.0,    0.0),
11588           new NutationModel( 1,-2, 2, 2, 2,    -31.0,   0.0,    0.0,     13.0,  0.0,    0.0),
11589           new NutationModel( 0, 0, 2, 3, 2,     37.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11590           new NutationModel(-1, 1, 2, 4, 2,     31.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11591 
11592        /* 311-320 */
11593           new NutationModel( 3, 0, 0, 2, 0,     49.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11594           new NutationModel(-1, 0, 4, 2, 2,     32.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11595           new NutationModel( 1, 1, 2, 2, 1,     23.0,   0.0,    0.0,    -12.0,  0.0,    0.0),
11596           new NutationModel(-2, 0, 2, 6, 2,    -43.0,   0.0,    0.0,     18.0,  0.0,    0.0),
11597           new NutationModel( 2, 1, 2, 2, 2,     26.0,   0.0,    0.0,    -11.0,  0.0,    0.0),
11598           new NutationModel(-1, 0, 2, 6, 2,    -32.0,   0.0,    0.0,     14.0,  0.0,    0.0),
11599           new NutationModel( 1, 0, 2, 4, 1,    -29.0,   0.0,    0.0,     14.0,  0.0,    0.0),
11600           new NutationModel( 2, 0, 2, 4, 2,    -27.0,   0.0,    0.0,     12.0,  0.0,    0.0),
11601           new NutationModel( 1, 1,-2, 1, 0,     30.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11602           new NutationModel(-3, 1, 2, 1, 2,    -11.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11603 
11604        /* 321-330 */
11605           new NutationModel( 2, 0,-2, 0, 2,    -21.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11606           new NutationModel(-1, 0, 0, 1, 2,    -34.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11607           new NutationModel(-4, 0, 2, 2, 1,    -10.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11608           new NutationModel(-1,-1, 0, 1, 0,    -36.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11609           new NutationModel( 0, 0,-2, 2, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11610           new NutationModel( 1, 0, 0,-1, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11611           new NutationModel( 0,-1, 2,-2, 3,    -21.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11612           new NutationModel(-2, 1, 2, 0, 0,    -29.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11613           new NutationModel( 0, 0, 2,-2, 4,    -15.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11614           new NutationModel(-2,-2, 0, 2, 0,    -20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11615 
11616        /* 331-340 */
11617           new NutationModel(-2, 0,-2, 4, 0,     28.0,   0.0,    0.0,      0.0,  0.0,   -2.0),
11618           new NutationModel( 0,-2,-2, 2, 0,     17.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11619           new NutationModel( 1, 2, 0,-2, 1,    -22.0,   0.0,    0.0,     12.0,  0.0,    0.0),
11620           new NutationModel( 3, 0, 0,-4, 1,    -14.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11621           new NutationModel(-1, 1, 2,-2, 2,     24.0,   0.0,    0.0,    -11.0,  0.0,    0.0),
11622           new NutationModel( 1,-1, 2,-4, 1,     11.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11623           new NutationModel( 1, 1, 0,-2, 2,     14.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11624           new NutationModel(-3, 0, 2, 0, 0,     24.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11625           new NutationModel(-3, 0, 2, 0, 2,     18.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11626           new NutationModel(-2, 0, 0, 1, 0,    -38.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11627 
11628        /* 341-350 */
11629           new NutationModel( 0, 0,-2, 1, 0,    -31.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11630           new NutationModel(-3, 0, 0, 2, 1,    -16.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11631           new NutationModel(-1,-1,-2, 2, 0,     29.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11632           new NutationModel( 0, 1, 2,-4, 1,    -18.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11633           new NutationModel( 2, 1, 0,-4, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11634           new NutationModel( 0, 2, 0,-2, 1,    -17.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11635           new NutationModel( 1, 0, 0,-3, 1,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11636           new NutationModel(-2, 0, 2,-2, 2,     16.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11637           new NutationModel(-2,-1, 0, 0, 1,     22.0,   0.0,    0.0,    -12.0,  0.0,    0.0),
11638           new NutationModel(-4, 0, 0, 2, 0,     20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11639 
11640        /* 351-360 */
11641           new NutationModel( 1, 1, 0,-4, 1,    -13.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11642           new NutationModel(-1, 0, 2,-4, 1,    -17.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11643           new NutationModel( 0, 0, 4,-4, 1,    -14.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11644           new NutationModel( 0, 3, 2,-2, 2,      0.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11645           new NutationModel(-3,-1, 0, 4, 0,     14.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11646           new NutationModel(-3, 0, 0, 4, 1,     19.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11647           new NutationModel( 1,-1,-2, 2, 0,    -34.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11648           new NutationModel(-1,-1, 0, 2, 2,    -20.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11649           new NutationModel( 1,-2, 0, 0, 1,      9.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11650           new NutationModel( 1,-1, 0, 0, 2,    -18.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11651 
11652        /* 361-370 */
11653           new NutationModel( 0, 0, 0, 1, 2,     13.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11654           new NutationModel(-1,-1, 2, 0, 0,     17.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11655           new NutationModel( 1,-2, 2,-2, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11656           new NutationModel( 0,-1, 2,-1, 1,     15.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11657           new NutationModel(-1, 0, 2, 0, 3,    -11.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11658           new NutationModel( 1, 1, 0, 0, 2,     13.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11659           new NutationModel(-1, 1, 2, 0, 0,    -18.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11660           new NutationModel( 1, 2, 0, 0, 0,    -35.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11661           new NutationModel(-1, 2, 2, 0, 2,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11662           new NutationModel(-1, 0, 4,-2, 1,    -19.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11663 
11664        /* 371-380 */
11665           new NutationModel( 3, 0, 2,-4, 2,    -26.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11666           new NutationModel( 1, 2, 2,-2, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11667           new NutationModel( 1, 0, 4,-4, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11668           new NutationModel(-2,-1, 0, 4, 1,     10.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11669           new NutationModel( 0,-1, 0, 2, 2,    -21.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11670           new NutationModel(-2, 1, 0, 4, 0,    -15.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11671           new NutationModel(-2,-1, 2, 2, 1,      9.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11672           new NutationModel( 2, 0,-2, 2, 0,    -29.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11673           new NutationModel( 1, 0, 0, 1, 1,    -19.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11674           new NutationModel( 0, 1, 0, 2, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11675 
11676        /* 381-390 */
11677           new NutationModel( 1,-1, 2,-1, 2,     22.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11678           new NutationModel(-2, 0, 4, 0, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11679           new NutationModel( 2, 1, 0, 0, 1,    -20.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11680           new NutationModel( 0, 1, 2, 0, 0,    -20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11681           new NutationModel( 0,-1, 4,-2, 2,    -17.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11682           new NutationModel( 0, 0, 4,-2, 4,     15.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11683           new NutationModel( 0, 2, 2, 0, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11684           new NutationModel(-3, 0, 0, 6, 0,     14.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11685           new NutationModel(-1,-1, 0, 4, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11686           new NutationModel( 1,-2, 0, 2, 0,     25.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11687 
11688        /* 391-400 */
11689           new NutationModel(-1, 0, 0, 4, 2,    -13.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11690           new NutationModel(-1,-2, 2, 2, 1,    -14.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11691           new NutationModel(-1, 0, 0,-2, 2,     13.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11692           new NutationModel( 1, 0,-2,-2, 1,    -17.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11693           new NutationModel( 0, 0,-2,-2, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11694           new NutationModel(-2, 0,-2, 0, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11695           new NutationModel( 0, 0, 0, 3, 1,     10.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11696           new NutationModel( 0, 0, 0, 3, 0,    -15.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11697           new NutationModel(-1, 1, 0, 4, 0,    -22.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11698           new NutationModel(-1,-1, 2, 2, 0,     28.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11699 
11700        /* 401-410 */
11701           new NutationModel(-2, 0, 2, 3, 2,     15.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11702           new NutationModel( 1, 0, 0, 2, 2,     23.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11703           new NutationModel( 0,-1, 2, 1, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11704           new NutationModel( 3,-1, 0, 0, 0,     29.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11705           new NutationModel( 2, 0, 0, 1, 0,    -25.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11706           new NutationModel( 1,-1, 2, 0, 0,     22.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11707           new NutationModel( 0, 0, 2, 1, 0,    -18.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11708           new NutationModel( 1, 0, 2, 0, 3,     15.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11709           new NutationModel( 3, 1, 0, 0, 0,    -23.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11710           new NutationModel( 3,-1, 2,-2, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11711 
11712        /* 411-420 */
11713           new NutationModel( 2, 0, 2,-1, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11714           new NutationModel( 1, 1, 2, 0, 0,    -19.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11715           new NutationModel( 0, 0, 4,-1, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11716           new NutationModel( 1, 2, 2, 0, 2,     21.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11717           new NutationModel(-2, 0, 0, 6, 0,     23.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11718           new NutationModel( 0,-1, 0, 4, 1,    -16.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11719           new NutationModel(-2,-1, 2, 4, 1,    -19.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11720           new NutationModel( 0,-2, 2, 2, 1,    -22.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11721           new NutationModel( 0,-1, 2, 2, 0,     27.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11722           new NutationModel(-1, 0, 2, 3, 1,     16.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11723 
11724        /* 421-430 */
11725           new NutationModel(-2, 1, 2, 4, 2,     19.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11726           new NutationModel( 2, 0, 0, 2, 2,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11727           new NutationModel( 2,-2, 2, 0, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11728           new NutationModel(-1, 1, 2, 3, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11729           new NutationModel( 3, 0, 2,-1, 2,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11730           new NutationModel( 4, 0, 2,-2, 1,     18.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11731           new NutationModel(-1, 0, 0, 6, 0,     16.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11732           new NutationModel(-1,-2, 2, 4, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11733           new NutationModel(-3, 0, 2, 6, 2,    -23.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11734           new NutationModel(-1, 0, 2, 4, 0,     16.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11735 
11736        /* 431-440 */
11737           new NutationModel( 3, 0, 0, 2, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11738           new NutationModel( 3,-1, 2, 0, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11739           new NutationModel( 3, 0, 2, 0, 0,     30.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11740           new NutationModel( 1, 0, 4, 0, 2,     24.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11741           new NutationModel( 5, 0, 2,-2, 2,     10.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11742           new NutationModel( 0,-1, 2, 4, 1,    -16.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11743           new NutationModel( 2,-1, 2, 2, 1,    -16.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11744           new NutationModel( 0, 1, 2, 4, 2,     17.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11745           new NutationModel( 1,-1, 2, 4, 2,    -24.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11746           new NutationModel( 3,-1, 2, 2, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11747 
11748        /* 441-450 */
11749           new NutationModel( 3, 0, 2, 2, 1,    -24.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11750           new NutationModel( 5, 0, 2, 0, 2,    -23.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11751           new NutationModel( 0, 0, 2, 6, 2,    -13.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11752           new NutationModel( 4, 0, 2, 2, 2,    -15.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11753           new NutationModel( 0,-1, 1,-1, 1,      0.0,   0.0,-1988.0,      0.0,  0.0,-1679.0),
11754           new NutationModel(-1, 0, 1, 0, 3,      0.0,   0.0,  -63.0,      0.0,  0.0,  -27.0),
11755           new NutationModel( 0,-2, 2,-2, 3,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11756           new NutationModel( 1, 0,-1, 0, 1,      0.0,   0.0,    5.0,      0.0,  0.0,    4.0),
11757           new NutationModel( 2,-2, 0,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11758           new NutationModel(-1, 0, 1, 0, 2,      0.0,   0.0,  364.0,      0.0,  0.0,  176.0),
11759 
11760        /* 451-460 */
11761           new NutationModel(-1, 0, 1, 0, 1,      0.0,   0.0,-1044.0,      0.0,  0.0, -891.0),
11762           new NutationModel(-1,-1, 2,-1, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11763           new NutationModel(-2, 2, 0, 2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11764           new NutationModel(-1, 0, 1, 0, 0,      0.0,   0.0,  330.0,      0.0,  0.0,    0.0),
11765           new NutationModel(-4, 1, 2, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11766           new NutationModel(-3, 0, 2, 1, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11767           new NutationModel(-2,-1, 2, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11768           new NutationModel( 1, 0,-2, 1, 1,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11769           new NutationModel( 2,-1,-2, 0, 1,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11770           new NutationModel(-4, 0, 2, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11771 
11772        /* 461-470 */
11773           new NutationModel(-3, 1, 0, 3, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11774           new NutationModel(-1, 0,-1, 2, 0,      0.0,   0.0,    5.0,      0.0,  0.0,    0.0),
11775           new NutationModel( 0,-2, 0, 0, 2,      0.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11776           new NutationModel( 0,-2, 0, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11777           new NutationModel(-3, 0, 0, 3, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11778           new NutationModel(-2,-1, 0, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11779           new NutationModel(-1, 0,-2, 3, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11780           new NutationModel(-4, 0, 0, 4, 0,    -12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11781           new NutationModel( 2, 1,-2, 0, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11782           new NutationModel( 2,-1, 0,-2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11783 
11784        /* 471-480 */
11785           new NutationModel( 0, 0, 1,-1, 0,     -5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11786           new NutationModel(-1, 2, 0, 1, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11787           new NutationModel(-2, 1, 2, 0, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11788           new NutationModel( 1, 1, 0,-1, 1,      7.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11789           new NutationModel( 1, 0, 1,-2, 1,      0.0,   0.0,  -12.0,      0.0,  0.0,  -10.0),
11790           new NutationModel( 0, 2, 0, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11791           new NutationModel( 1,-1, 2,-3, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11792           new NutationModel(-1, 1, 2,-1, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11793           new NutationModel(-2, 0, 4,-2, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11794           new NutationModel(-2, 0, 4,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11795 
11796        /* 481-490 */
11797           new NutationModel(-2,-2, 0, 2, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11798           new NutationModel(-2, 0,-2, 4, 0,      0.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11799           new NutationModel( 1, 2, 2,-4, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11800           new NutationModel( 1, 1, 2,-4, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11801           new NutationModel(-1, 2, 2,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11802           new NutationModel( 2, 0, 0,-3, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11803           new NutationModel(-1, 2, 0, 0, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11804           new NutationModel( 0, 0, 0,-2, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11805           new NutationModel(-1,-1, 2,-2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11806           new NutationModel(-1, 1, 0, 0, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11807 
11808        /* 491-500 */
11809           new NutationModel( 0, 0, 0,-1, 2,     -8.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11810           new NutationModel(-2, 1, 0, 1, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11811           new NutationModel( 1,-2, 0,-2, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11812           new NutationModel( 1, 0,-2, 0, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11813           new NutationModel(-3, 1, 0, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11814           new NutationModel(-1, 1,-2, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11815           new NutationModel(-1,-1, 0, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11816           new NutationModel(-3, 0, 0, 2, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11817           new NutationModel(-3,-1, 0, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11818           new NutationModel( 2, 0, 2,-6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11819 
11820        /* 501-510 */
11821           new NutationModel( 0, 1, 2,-4, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11822           new NutationModel( 2, 0, 0,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11823           new NutationModel(-2, 1, 2,-2, 1,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11824           new NutationModel( 0,-1, 2,-4, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11825           new NutationModel( 0, 1, 0,-2, 2,      9.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11826           new NutationModel(-1, 0, 0,-2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11827           new NutationModel( 2, 0,-2,-2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11828           new NutationModel(-4, 0, 2, 0, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11829           new NutationModel(-1,-1, 0,-1, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11830           new NutationModel( 0, 0,-2, 0, 2,      9.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11831 
11832        /* 511-520 */
11833           new NutationModel(-3, 0, 0, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11834           new NutationModel(-1, 0,-2, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11835           new NutationModel(-2, 0,-2, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11836           new NutationModel( 0, 0,-4, 2, 0,      8.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11837           new NutationModel(-2,-1,-2, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11838           new NutationModel( 1, 0, 2,-6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11839           new NutationModel(-1, 0, 2,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11840           new NutationModel( 1, 0, 0,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11841           new NutationModel( 2, 1, 2,-4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11842           new NutationModel( 2, 1, 2,-4, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11843 
11844        /* 521-530 */
11845           new NutationModel( 0, 1, 4,-4, 4,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11846           new NutationModel( 0, 1, 4,-4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11847           new NutationModel(-1,-1,-2, 4, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11848           new NutationModel(-1,-3, 0, 2, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11849           new NutationModel(-1, 0,-2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11850           new NutationModel(-2,-1, 0, 3, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11851           new NutationModel( 0, 0,-2, 3, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11852           new NutationModel(-2, 0, 0, 3, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11853           new NutationModel( 0,-1, 0, 1, 0,    -13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11854           new NutationModel(-3, 0, 2, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11855 
11856        /* 531-540 */
11857           new NutationModel( 1, 1,-2, 2, 0,     10.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11858           new NutationModel(-1, 1, 0, 2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11859           new NutationModel( 1,-2, 2,-2, 1,     10.0,   0.0,   13.0,      6.0,  0.0,   -5.0),
11860           new NutationModel( 0, 0, 1, 0, 2,      0.0,   0.0,   30.0,      0.0,  0.0,   14.0),
11861           new NutationModel( 0, 0, 1, 0, 1,      0.0,   0.0, -162.0,      0.0,  0.0, -138.0),
11862           new NutationModel( 0, 0, 1, 0, 0,      0.0,   0.0,   75.0,      0.0,  0.0,    0.0),
11863           new NutationModel(-1, 2, 0, 2, 1,     -7.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11864           new NutationModel( 0, 0, 2, 0, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11865           new NutationModel(-2, 0, 2, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11866           new NutationModel( 2, 0, 0,-1, 1,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11867 
11868        /* 541-550 */
11869           new NutationModel( 3, 0, 0,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11870           new NutationModel( 1, 0, 2,-2, 3,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11871           new NutationModel( 1, 2, 0, 0, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11872           new NutationModel( 2, 0, 2,-3, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11873           new NutationModel(-1, 1, 4,-2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11874           new NutationModel(-2,-2, 0, 4, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11875           new NutationModel( 0,-3, 0, 2, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11876           new NutationModel( 0, 0,-2, 4, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11877           new NutationModel(-1,-1, 0, 3, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11878           new NutationModel(-2, 0, 0, 4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11879 
11880        /* 551-560 */
11881           new NutationModel(-1, 0, 0, 3, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11882           new NutationModel( 2,-2, 0, 0, 0,      7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11883           new NutationModel( 1,-1, 0, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11884           new NutationModel(-1, 0, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11885           new NutationModel( 0,-2, 2, 0, 1,     -6.0,   0.0,   -3.0,      3.0,  0.0,    1.0),
11886           new NutationModel(-1, 0, 1, 2, 1,      0.0,   0.0,   -3.0,      0.0,  0.0,   -2.0),
11887           new NutationModel(-1, 1, 0, 3, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11888           new NutationModel(-1,-1, 2, 1, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11889           new NutationModel( 0,-1, 2, 0, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11890           new NutationModel(-2, 1, 2, 2, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11891 
11892        /* 561-570 */
11893           new NutationModel( 2,-2, 2,-2, 2,     -1.0,   0.0,    3.0,      3.0,  0.0,   -1.0),
11894           new NutationModel( 1, 1, 0, 1, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11895           new NutationModel( 1, 0, 1, 0, 1,      0.0,   0.0,  -13.0,      0.0,  0.0,  -11.0),
11896           new NutationModel( 1, 0, 1, 0, 0,      3.0,   0.0,    6.0,      0.0,  0.0,    0.0),
11897           new NutationModel( 0, 2, 0, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11898           new NutationModel( 2,-1, 2,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11899           new NutationModel( 0,-1, 4,-2, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11900           new NutationModel( 0, 0, 4,-2, 3,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11901           new NutationModel( 0, 1, 4,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11902           new NutationModel( 4, 0, 2,-4, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11903 
11904        /* 571-580 */
11905           new NutationModel( 2, 2, 2,-2, 2,      8.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11906           new NutationModel( 2, 0, 4,-4, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11907           new NutationModel(-1,-2, 0, 4, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11908           new NutationModel(-1,-3, 2, 2, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11909           new NutationModel(-3, 0, 2, 4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11910           new NutationModel(-3, 0, 2,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11911           new NutationModel(-1,-1, 0,-2, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11912           new NutationModel(-3, 0, 0, 0, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11913           new NutationModel(-3, 0,-2, 2, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11914           new NutationModel( 0, 1, 0,-4, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11915 
11916        /* 581-590 */
11917           new NutationModel(-2, 1, 0,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11918           new NutationModel(-4, 0, 0, 0, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11919           new NutationModel(-1, 0, 0,-4, 1,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11920           new NutationModel(-3, 0, 0,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11921           new NutationModel( 0, 0, 0, 3, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11922           new NutationModel(-1, 1, 0, 4, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11923           new NutationModel( 1,-2, 2, 0, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11924           new NutationModel( 0, 1, 0, 3, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11925           new NutationModel(-1, 0, 2, 2, 3,      6.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11926           new NutationModel( 0, 0, 2, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11927 
11928        /* 591-600 */
11929           new NutationModel(-2, 0, 2, 2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11930           new NutationModel(-1, 1, 2, 2, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11931           new NutationModel( 3, 0, 0, 0, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11932           new NutationModel( 2, 1, 0, 1, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11933           new NutationModel( 2,-1, 2,-1, 2,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11934           new NutationModel( 0, 0, 2, 0, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11935           new NutationModel( 0, 0, 3, 0, 3,      0.0,   0.0,  -26.0,      0.0,  0.0,  -11.0),
11936           new NutationModel( 0, 0, 3, 0, 2,      0.0,   0.0,  -10.0,      0.0,  0.0,   -5.0),
11937           new NutationModel(-1, 2, 2, 2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11938           new NutationModel(-1, 0, 4, 0, 0,    -13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11939 
11940        /* 601-610 */
11941           new NutationModel( 1, 2, 2, 0, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11942           new NutationModel( 3, 1, 2,-2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11943           new NutationModel( 1, 1, 4,-2, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11944           new NutationModel(-2,-1, 0, 6, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11945           new NutationModel( 0,-2, 0, 4, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11946           new NutationModel(-2, 0, 0, 6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11947           new NutationModel(-2,-2, 2, 4, 2,     -6.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11948           new NutationModel( 0,-3, 2, 2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11949           new NutationModel( 0, 0, 0, 4, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11950           new NutationModel(-1,-1, 2, 3, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11951 
11952        /* 611-620 */
11953           new NutationModel(-2, 0, 2, 4, 0,     13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11954           new NutationModel( 2,-1, 0, 2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11955           new NutationModel( 1, 0, 0, 3, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11956           new NutationModel( 0, 1, 0, 4, 1,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11957           new NutationModel( 0, 1, 0, 4, 0,    -11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11958           new NutationModel( 1,-1, 2, 1, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11959           new NutationModel( 0, 0, 2, 2, 3,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11960           new NutationModel( 1, 0, 2, 2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11961           new NutationModel(-1, 0, 2, 2, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11962           new NutationModel(-2, 0, 4, 2, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11963 
11964        /* 621-630 */
11965           new NutationModel( 2, 1, 0, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11966           new NutationModel( 2, 1, 0, 2, 0,    -12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11967           new NutationModel( 2,-1, 2, 0, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11968           new NutationModel( 1, 0, 2, 1, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11969           new NutationModel( 0, 1, 2, 2, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11970           new NutationModel( 2, 0, 2, 0, 3,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11971           new NutationModel( 3, 0, 2, 0, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11972           new NutationModel( 1, 0, 2, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11973           new NutationModel( 1, 0, 3, 0, 3,      0.0,   0.0,   -5.0,      0.0,  0.0,   -2.0),
11974           new NutationModel( 1, 1, 2, 1, 1,     -7.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11975 
11976        /* 631-640 */
11977           new NutationModel( 0, 2, 2, 2, 2,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11978           new NutationModel( 2, 1, 2, 0, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11979           new NutationModel( 2, 0, 4,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11980           new NutationModel( 4, 1, 2,-2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11981           new NutationModel(-1,-1, 0, 6, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11982           new NutationModel(-3,-1, 2, 6, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11983           new NutationModel(-1, 0, 0, 6, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11984           new NutationModel(-3, 0, 2, 6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11985           new NutationModel( 1,-1, 0, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11986           new NutationModel( 1,-1, 0, 4, 0,     12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11987 
11988        /* 641-650 */
11989           new NutationModel(-2, 0, 2, 5, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11990           new NutationModel( 1,-2, 2, 2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11991           new NutationModel( 3,-1, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11992           new NutationModel( 1,-1, 2, 2, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11993           new NutationModel( 0, 0, 2, 3, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11994           new NutationModel(-1, 1, 2, 4, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11995           new NutationModel( 0, 1, 2, 3, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11996           new NutationModel(-1, 0, 4, 2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11997           new NutationModel( 2, 0, 2, 1, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11998           new NutationModel( 5, 0, 0, 0, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11999 
12000        /* 651-660 */
12001           new NutationModel( 2, 1, 2, 1, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
12002           new NutationModel( 1, 0, 4, 0, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12003           new NutationModel( 3, 1, 2, 0, 1,      7.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
12004           new NutationModel( 3, 0, 4,-2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12005           new NutationModel(-2,-1, 2, 6, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12006           new NutationModel( 0, 0, 0, 6, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12007           new NutationModel( 0,-2, 2, 4, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
12008           new NutationModel(-2, 0, 2, 6, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
12009           new NutationModel( 2, 0, 0, 4, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12010           new NutationModel( 2, 0, 0, 4, 0,     10.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12011 
12012        /* 661-670 */
12013           new NutationModel( 2,-2, 2, 2, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12014           new NutationModel( 0, 0, 2, 4, 0,      7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12015           new NutationModel( 1, 0, 2, 3, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
12016           new NutationModel( 4, 0, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12017           new NutationModel( 2, 0, 2, 2, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12018           new NutationModel( 0, 0, 4, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12019           new NutationModel( 4,-1, 2, 0, 2,     -6.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12020           new NutationModel( 3, 0, 2, 1, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12021           new NutationModel( 2, 1, 2, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12022           new NutationModel( 4, 1, 2, 0, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12023 
12024        /* 671-678 */
12025           new NutationModel(-1,-1, 2, 6, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12026           new NutationModel(-1, 0, 2, 6, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12027           new NutationModel( 1,-1, 2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12028           new NutationModel( 1, 1, 2, 4, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12029           new NutationModel( 3, 1, 2, 2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
12030           new NutationModel( 5, 0, 2, 0, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
12031           new NutationModel( 2,-1, 2, 4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
12032           new NutationModel( 2, 0, 2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0)
12033        };
12034 
12035     /* Number of terms in the luni-solar nutation model */
12036        final int NLS = xls.length;
12037 
12038     /* ------------------------ */
12039     /* Planetary nutation model */
12040     /* ------------------------ */
12041 
12042     /* The units for the sine and cosine coefficients are */
12043     /* 0.1 microarcsecond                                 */
12044 
12045         final class PlanetaryNutModel {
12046          final int nl,               /* coefficients of l, F, D and Omega */
12047               nf,
12048               nd,
12049               nom,
12050               nme,              /* coefficients of planetary longitudes */
12051               nve,
12052               nea,
12053               nma,
12054               nju,
12055               nsa,
12056               nur,
12057               nne,
12058               npa;              /* coefficient of general precession */
12059           final int sp,cp;            /* longitude sin, cos coefficients */
12060           final int se,ce;            /* obliquity sin, cos coefficients */
12061           public PlanetaryNutModel(          int nl,               
12062                   int nf,
12063                   int nd,
12064                   int nom,
12065                   int nme,     
12066                   int nve,
12067                   int nea,
12068                   int nma,
12069                   int nju,
12070                   int nsa,
12071                   int nur,
12072                   int nne,
12073                   int npa,              
12074               int sp,int cp,           
12075               int se,int ce           
12076 ) {
12077               this.nl = nl;               /* coefficients of l, F, D and Omega */
12078               this.nf = nf;
12079               this.nd = nd;
12080               this.nom = nom;
12081               this.nme = nme;              /* coefficients of planetary longitudes */
12082               this.nve = nve;
12083               this.nea = nea;
12084               this.nma = nma;
12085               this.nju = nju;
12086               this.nsa = nsa;
12087               this.nur = nur;
12088               this.nne = nne;
12089               this.npa = npa;              /* coefficient of general precession */
12090            this.sp = sp; this.cp = cp;            /* longitude sin, cos coefficients */
12091            this.se = se; this.ce = ce;            /* obliquity sin, cos coefficients */
12092       
12093         }
12094        }
12095        
12096        PlanetaryNutModel xpl[] = {
12097 
12098        /* 1-10 */
12099           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-16, 4, 5, 0, 0, 0, 1440,   0,    0,   0),
12100           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 16,-4,-5, 0, 0, 2,   56,-117,  -42, -40),
12101           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-16, 4, 5, 0, 0, 2,  125, -43,    0, -54),
12102           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0,-1, 2, 2,    0,   5,    0,   0),
12103           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8,-1,-5, 0, 0, 2,    3,  -7,   -3,   0),
12104           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 1,    3,   0,    0,  -2),
12105           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  3, -8, 3, 0, 0, 0, 0, -114,   0,    0,  61),
12106           new PlanetaryNutModel(-1, 0, 0, 0, 0, 10, -3,  0, 0, 0, 0, 0, 0, -219,  89,    0,   0),
12107           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 6,-3, 0, 2,   -3,   0,    0,   0),
12108           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0, -462,1604,    0,   0),
12109 
12110        /* 11-20 */
12111           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -5,  8,-3, 0, 0, 0, 0,   99,   0,    0, -53),
12112           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8,-3, 0, 0, 0, 1,   -3,   0,    0,   2),
12113           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 1, 5, 0, 0, 2,    0,   6,    2,   0),
12114           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  4, 0, 0, 0, 0, 2,    3,   0,    0,   0),
12115           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 2,  -12,   0,    0,   0),
12116           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 1,   14,-218,  117,   8),
12117           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 2,-5, 0, 0, 0,   31,-481, -257, -17),
12118           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 0, -491, 128,    0,   0),
12119           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647),
12120           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771),
12121 
12122        /* 21-30 */
12123           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 5, 0, 0, 2,   11, -24,  -11,  -9),
12124           new PlanetaryNutModel( 2,-1,-1, 0, 0,  0,  3, -7, 0, 0, 0, 0, 0,   26,  -9,    0,   0),
12125           new PlanetaryNutModel( 1, 0,-2, 0, 0, 19,-21,  3, 0, 0, 0, 0, 0,  103, -60,    0,   0),
12126           new PlanetaryNutModel( 0, 1,-1, 1, 0,  2, -4,  0,-3, 0, 0, 0, 0,    0, -13,   -7,   0),
12127           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,  -26, -29,  -16,  14),
12128           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-4,10, 0, 0, 0,    9, -27,  -14,  -5),
12129           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0, 0,-5, 0, 0, 0,   12,   0,    0,  -6),
12130           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -7,  4, 0, 0, 0, 0, 0,   -7,   0,    0,   0),
12131           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 1,-1, 0, 0, 0,    0,  24,    0,   0),
12132           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,  284,   0,    0,-151),
12133 
12134        /* 31-40 */
12135           new PlanetaryNutModel(-1, 0, 0, 0, 0, 18,-16,  0, 0, 0, 0, 0, 0,  226, 101,    0,   0),
12136           new PlanetaryNutModel(-2, 1, 1, 2, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -8,   -2,   0),
12137           new PlanetaryNutModel(-1, 1,-1, 1, 0, 18,-17,  0, 0, 0, 0, 0, 0,    0,  -6,   -3,   0),
12138           new PlanetaryNutModel(-1, 0, 1, 1, 0,  0,  2, -2, 0, 0, 0, 0, 0,    5,   0,    0,  -3),
12139           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13,  0, 0, 0, 0, 0, 2,  -41, 175,   76,  17),
12140           new PlanetaryNutModel( 0, 2,-2, 2, 0, -8, 11,  0, 0, 0, 0, 0, 0,    0,  15,    6,   0),
12141           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13,  0, 0, 0, 0, 0, 1,  425, 212, -133, 269),
12142           new PlanetaryNutModel( 0, 1,-1, 1, 0, -8, 12,  0, 0, 0, 0, 0, 0, 1200, 598,  319,-641),
12143           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8,-13,  0, 0, 0, 0, 0, 0,  235, 334,    0,   0),
12144           new PlanetaryNutModel( 0, 1,-1, 1, 0,  8,-14,  0, 0, 0, 0, 0, 0,   11, -12,   -7,  -6),
12145 
12146        /* 41-50 */
12147           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8,-13,  0, 0, 0, 0, 0, 1,    5,  -6,    3,   3),
12148           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-4, 5, 0, 0, 0,   -5,   0,    0,   3),
12149           new PlanetaryNutModel(-2, 0, 2, 2, 0,  3, -3,  0, 0, 0, 0, 0, 0,    6,   0,    0,  -3),
12150           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-3, 1, 0, 0, 0,   15,   0,    0,   0),
12151           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -5,  0, 2, 0, 0, 0, 0,   13,   0,    0,  -7),
12152           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-4, 3, 0, 0, 0,   -6,  -9,    0,   0),
12153           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  0,  2, 0, 0, 0, 0, 0,  266, -78,    0,   0),
12154           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  2, 0, 0, 0, 0, 0, -460,-435, -232, 246),
12155           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -2,  2, 0, 0, 0, 0, 0,    0,  15,    7,   0),
12156           new PlanetaryNutModel(-1, 1, 0, 1, 0,  3, -5,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12157 
12158        /* 51-60 */
12159           new PlanetaryNutModel(-1, 0, 1, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0, 131,    0,   0),
12160           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-2,-2, 0, 0, 0,    4,   0,    0,   0),
12161           new PlanetaryNutModel(-2, 2, 0, 2, 0,  0, -5,  9, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12162           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0,-1, 0, 0,    0,   4,    2,   0),
12163           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 1, 0, 0,    0,   3,    0,   0),
12164           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 2, 0,  -17, -19,  -10,   9),
12165           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 2, 1,   -9, -11,    6,  -5),
12166           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 2, 2,   -6,   0,    0,   3),
12167           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  3, -4, 0, 0, 0, 0, 0,  -16,   8,    0,   0),
12168           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0, 2, 0, 0, 0,    0,   3,    0,   0),
12169 
12170        /* 61-70 */
12171           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0, 2, 0, 0, 0,   11,  24,   11,  -5),
12172           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -9, 17, 0, 0, 0, 0, 0,   -3,  -4,   -2,   1),
12173           new PlanetaryNutModel( 0, 0, 0, 2, 0, -3,  5,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12174           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 2, 0, 0, 0,    0,  -8,   -4,   0),
12175           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1,-2, 0, 0, 0,    0,   3,    0,   0),
12176           new PlanetaryNutModel( 1, 0,-2, 0, 0, 17,-16,  0,-2, 0, 0, 0, 0,    0,   5,    0,   0),
12177           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 1,-3, 0, 0, 0,    0,   3,    2,   0),
12178           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  5, -6, 0, 0, 0, 0, 0,   -6,   4,    2,   3),
12179           new PlanetaryNutModel( 0,-2, 2, 0, 0,  0,  9,-13, 0, 0, 0, 0, 0,   -3,  -5,    0,   0),
12180           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0, 1, 0, 0, 0,   -5,   0,    0,   2),
12181 
12182        /* 71-80 */
12183           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 0, 1, 0, 0, 0,    4,  24,   13,  -2),
12184           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0, 1, 0, 0, 0,  -42,  20,    0,   0),
12185           new PlanetaryNutModel( 0,-2, 2, 0, 0,  5, -6,  0, 0, 0, 0, 0, 0,  -10, 233,    0,   0),
12186           new PlanetaryNutModel( 0,-1, 1, 1, 0,  5, -7,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12187           new PlanetaryNutModel(-2, 0, 2, 0, 0,  6, -8,  0, 0, 0, 0, 0, 0,   78, -18,    0,   0),
12188           new PlanetaryNutModel( 2, 1,-3, 1, 0, -6,  7,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12189           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0,  0,  0, 1, 0, 0, 0, 0,    0,  -3,   -1,   0),
12190           new PlanetaryNutModel( 0,-1, 1, 1, 0,  0,  1,  0, 1, 0, 0, 0, 0,    0,  -4,   -2,   1),
12191           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0, 2, 0, 0,    0,  -8,   -4,  -1),
12192           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 2, 0, 1,    0,  -5,    3,   0),
12193 
12194        /* 81-90 */
12195           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 2, 0, 2,   -7,   0,    0,   3),
12196           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 15, 0, 0, 0, 0, 2,  -14,   8,    3,   6),
12197           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 15, 0, 0, 0, 0, 1,    0,   8,   -4,   0),
12198           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -9, 15, 0, 0, 0, 0, 0,    0,  19,   10,   0),
12199           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-15, 0, 0, 0, 0, 0,   45, -22,    0,   0),
12200           new PlanetaryNutModel( 1,-1,-1, 0, 0,  0,  8,-15, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12201           new PlanetaryNutModel( 2, 0,-2, 0, 0,  2, -5,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12202           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-5, 5, 0, 0, 0,    0,   3,    0,   0),
12203           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -6,  8, 0, 0, 0, 0, 0,    3,   5,    3,  -2),
12204           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,   89, -16,   -9, -48),
12205 
12206        /* 91-100 */
12207           new PlanetaryNutModel(-2, 1, 1, 0, 0,  0,  1,  0,-3, 0, 0, 0, 0,    0,   3,    0,   0),
12208           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0,-3, 0, 0, 0, 0,   -3,   7,    4,   2),
12209           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0, -349, -62,    0,   0),
12210           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  6, -8, 0, 0, 0, 0, 0,  -15,  22,    0,   0),
12211           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-1,-5, 0, 0, 0,   -3,   0,    0,   0),
12212           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,  -53,   0,    0,   0),
12213           new PlanetaryNutModel(-1, 1, 1, 1, 0,-20, 20,  0, 0, 0, 0, 0, 0,    5,   0,    0,  -3),
12214           new PlanetaryNutModel( 1, 0,-2, 0, 0, 20,-21,  0, 0, 0, 0, 0, 0,    0,  -8,    0,   0),
12215           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  8,-15, 0, 0, 0, 0, 0,   15,  -7,   -4,  -8),
12216           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,-10, 15, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12217 
12218        /* 101-110 */
12219           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 1, 0, 0, 0, 0,  -21, -78,    0,   0),
12220           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 1, 0, 0, 0, 0,   20, -70,  -37, -11),
12221           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    0,   6,    3,   0),
12222           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-2, 4, 0, 0, 0,    5,   3,    2,  -2),
12223           new PlanetaryNutModel( 2, 0,-2, 1, 0, -6,  8,  0, 0, 0, 0, 0, 0,  -17,  -4,   -2,   9),
12224           new PlanetaryNutModel( 0,-2, 2, 1, 0,  5, -6,  0, 0, 0, 0, 0, 0,    0,   6,    3,   0),
12225           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0,-1, 0, 0, 1,   32,  15,   -8,  17),
12226           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0,-1, 0, 0, 0,  174,  84,   45, -93),
12227           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 0,   11,  56,    0,   0),
12228           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 1, 0, 0, 0,  -66, -12,   -6,  35),
12229 
12230        /* 111-120 */
12231           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 1,   47,   8,    4, -25),
12232           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 2,    0,   8,    4,   0),
12233           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -9, 13, 0, 0, 0, 0, 0,   10, -22,  -12,  -5),
12234           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  7,-13, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12235           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  5, -6, 0, 0, 0, 0, 0,  -24,  12,    0,   0),
12236           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  9,-17, 0, 0, 0, 0, 0,    5,  -6,    0,   0),
12237           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -9, 17, 0, 0, 0, 0, 2,    3,   0,    0,  -2),
12238           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -3,  4, 0, 0, 0, 0, 0,    4,   3,    1,  -2),
12239           new PlanetaryNutModel( 1, 0,-1, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,  29,   15,   0),
12240           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0, -1,  2, 0, 0, 0, 0, 0,   -5,  -4,   -2,   2),
12241 
12242        /* 121-130 */
12243           new PlanetaryNutModel( 0,-1, 1, 1, 0,  0,  0,  2, 0, 0, 0, 0, 0,    8,  -3,   -1,  -5),
12244           new PlanetaryNutModel( 0,-2, 2, 0, 1,  0, -2,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12245           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 2, 0, 0, 0, 0,   10,   0,    0,   0),
12246           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-3, 1, 0, 0, 0,    3,   0,    0,  -2),
12247           new PlanetaryNutModel(-2, 0, 2, 1, 0,  3, -3,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   3),
12248           new PlanetaryNutModel( 0, 0, 0, 1, 0,  8,-13,  0, 0, 0, 0, 0, 0,   46,  66,   35, -25),
12249           new PlanetaryNutModel( 0,-1, 1, 0, 0,  8,-12,  0, 0, 0, 0, 0, 0,  -14,   7,    0,   0),
12250           new PlanetaryNutModel( 0, 2,-2, 1, 0, -8, 11,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12251           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12252           new PlanetaryNutModel(-1, 0, 0, 1, 0, 18,-16,  0, 0, 0, 0, 0, 0,  -68, -34,  -18,  36),
12253 
12254        /* 131-140 */
12255           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 1, 0, 0, 0,    0,  14,    7,   0),
12256           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -7,  4, 0, 0, 0, 0, 0,   10,  -6,   -3,  -5),
12257           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0, -3,  7, 0, 0, 0, 0, 0,   -5,  -4,   -2,   3),
12258           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0,-2, 5, 0, 0, 0,   -3,   5,    2,   1),
12259           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0,-2, 5, 0, 0, 0,   76,  17,    9, -41),
12260           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -4,  8,-3, 0, 0, 0, 0,   84, 298,  159, -45),
12261           new PlanetaryNutModel( 1, 0, 0, 1, 0,-10,  3,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12262           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12263           new PlanetaryNutModel(-1, 0, 0, 1, 0, 10, -3,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12264           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  4, -8, 3, 0, 0, 0, 0,  -82, 292,  156,  44),
12265 
12266        /* 141-150 */
12267           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 2,-5, 0, 0, 0,  -73,  17,    9,  39),
12268           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 2,-5, 0, 0, 0,   -9, -16,    0,   0),
12269           new PlanetaryNutModel( 2,-1,-1, 1, 0,  0,  3, -7, 0, 0, 0, 0, 0,    3,   0,   -1,  -2),
12270           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0, 0,-5, 0, 0, 0,   -3,   0,    0,   0),
12271           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  7, -4, 0, 0, 0, 0, 0,   -9,  -5,   -3,   5),
12272           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0, -439,   0,    0,   0),
12273           new PlanetaryNutModel( 1, 0, 0, 1, 0,-18, 16,  0, 0, 0, 0, 0, 0,   57, -28,  -15, -30),
12274           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -6,   -3,   0),
12275           new PlanetaryNutModel( 0, 1,-1, 2, 0, -8, 12,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   2),
12276           new PlanetaryNutModel( 0, 0, 0, 1, 0, -8, 13,  0, 0, 0, 0, 0, 0,  -40,  57,   30,  21),
12277 
12278        /* 151-160 */
12279           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -2, 0, 0, 0, 0, 1,   23,   7,    3, -13),
12280           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  0, -2, 0, 0, 0, 0, 0,  273,  80,   43,-146),
12281           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -2, 0, 0, 0, 0, 0, -449, 430,    0,   0),
12282           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -2,  2, 0, 0, 0, 0, 0,   -8, -47,  -25,   4),
12283           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  2, 0, 0, 0, 0, 1,    6,  47,   25,  -3),
12284           new PlanetaryNutModel(-1, 0, 1, 1, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  23,   13,   0),
12285           new PlanetaryNutModel(-1, 0, 1, 1, 0,  0,  3, -4, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12286           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0,-2, 0, 0, 0,    3,  -4,   -2,  -2),
12287           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 2, 0, 0, 0,  -48,-110,  -59,  26),
12288           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 2, 0, 0, 1,   51, 114,   61, -27),
12289 
12290        /* 161-170 */
12291           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 2, 0, 0, 2, -133,   0,    0,  57),
12292           new PlanetaryNutModel( 0, 1,-1, 0, 0,  3, -6,  0, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12293           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  5,  0, 0, 0, 0, 0, 0,  -21,  -6,   -3,  11),
12294           new PlanetaryNutModel( 0, 1,-1, 2, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,  -3,   -1,   0),
12295           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -2,  4, 0, 0, 0, 0, 0,  -11, -21,  -11,   6),
12296           new PlanetaryNutModel( 0, 2,-2, 1, 0, -5,  6,  0, 0, 0, 0, 0, 0,  -18,-436, -233,   9),
12297           new PlanetaryNutModel( 0,-1, 1, 0, 0,  5, -7,  0, 0, 0, 0, 0, 0,   35,  -7,    0,   0),
12298           new PlanetaryNutModel( 0, 0, 0, 1, 0,  5, -8,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12299           new PlanetaryNutModel(-2, 0, 2, 1, 0,  6, -8,  0, 0, 0, 0, 0, 0,   11,  -3,   -1,  -6),
12300           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -8, 15, 0, 0, 0, 0, 0,   -5,  -3,   -1,   3),
12301 
12302        /* 171-180 */
12303           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-3, 0, 0, 0, 0,  -53,  -9,   -5,  28),
12304           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  6, -8, 0, 0, 0, 0, 0,    0,   3,    2,   1),
12305           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,    4,   0,    0,  -2),
12306           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3,-5, 0, 0, 0,    0,  -4,    0,   0),
12307           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 0, 0, 0, 0,  -50, 194,  103,  27),
12308           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-1, 0, 0, 0, 1,  -13,  52,   28,   7),
12309           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 0,  -91, 248,    0,   0),
12310           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 1,    6,  49,   26,  -3),
12311           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,   -6, -47,  -25,   3),
12312           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 1,    0,   5,    3,   0),
12313 
12314        /* 181-190 */
12315           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 2,   52,  23,   10, -23),
12316           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0,-1, 0, 0, 0,   -3,   0,    0,   1),
12317           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 0,-1, 0, 0, 0,    0,   5,    3,   0),
12318           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0,-1, 0, 0, 0,   -4,   0,    0,   0),
12319           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -7, 13, 0, 0, 0, 0, 2,   -4,   8,    3,   2),
12320           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7,-13, 0, 0, 0, 0, 0,   10,   0,    0,   0),
12321           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -5,  6, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12322           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -8, 11, 0, 0, 0, 0, 0,    0,   8,    4,   0),
12323           new PlanetaryNutModel( 0, 2,-2, 1,-1,  0,  2,  0, 0, 0, 0, 0, 0,    0,   8,    4,   1),
12324           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  4, -4, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12325 
12326        /* 191-200 */
12327           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-2, 0, 0, 0,   -4,   0,    0,   0),
12328           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 3, 0, 0, 0,   -8,   4,    2,   4),
12329           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 3, 0, 0, 1,    8,  -4,   -2,  -4),
12330           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 3, 0, 0, 2,    0,  15,    7,   0),
12331           new PlanetaryNutModel(-2, 0, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0, -138,   0,    0,   0),
12332           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,  -7,   -3,   0),
12333           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -7,   -3,   0),
12334           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,   54,   0,    0, -29),
12335           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 2, 0, 0, 0, 0,    0,  10,    4,   0),
12336           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0,  0, -2, 0, 0, 0, 0, 0,   -7,   0,    0,   3),
12337 
12338        /* 201-210 */
12339           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1, -2, 0, 0, 0, 0, 0,  -37,  35,   19,  20),
12340           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12341           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0,-2, 0, 0, 0,   -4,   9,    0,   0),
12342           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 0, 2, 0, 0, 0,    8,   0,    0,  -4),
12343           new PlanetaryNutModel( 0, 1,-1, 1, 0,  3, -6,  0, 0, 0, 0, 0, 0,   -9, -14,   -8,   5),
12344           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 0, 0, 0, 0, 1,   -3,  -9,   -5,   3),
12345           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 0, 0, 0, 0, 0, -145,  47,    0,   0),
12346           new PlanetaryNutModel( 0, 1,-1, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,  -10,  40,   21,   5),
12347           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 1,   11, -49,  -26,  -7),
12348           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 2,-2150,   0,    0, 932),
12349 
12350        /* 211-220 */
12351           new PlanetaryNutModel( 0, 2,-2, 2, 0, -3,  3,  0, 0, 0, 0, 0, 0,  -12,   0,    0,   5),
12352           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 2,   85,   0,    0, -37),
12353           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -4, 0, 0, 0, 0, 1,    4,   0,    0,  -2),
12354           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  1, -4, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12355           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -4, 0, 0, 0, 0, 0,  -86, 153,    0,   0),
12356           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 1,   -6,   9,    5,   3),
12357           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -3,  4, 0, 0, 0, 0, 0,    9, -13,   -7,  -5),
12358           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 1,   -8,  12,    6,   4),
12359           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 2,  -51,   0,    0,  22),
12360           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 2,  -11,-268, -116,   5),
12361 
12362        /* 221-230 */
12363           new PlanetaryNutModel( 0, 2,-2, 2, 0, -5,  6,  0, 0, 0, 0, 0, 0,    0,  12,    5,   0),
12364           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 2,    0,   7,    3,   0),
12365           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 1,   31,   6,    3, -17),
12366           new PlanetaryNutModel( 0, 1,-1, 1, 0, -5,  7,  0, 0, 0, 0, 0, 0,  140,  27,   14, -75),
12367           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 1,   57,  11,    6, -30),
12368           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -8,  0, 0, 0, 0, 0, 0,  -14, -39,    0,   0),
12369           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0,-1, 0, 0, 0, 0,    0,  -6,   -2,   0),
12370           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0,-1, 0, 0, 0, 0,    4,  15,    8,  -2),
12371           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    0,   4,    0,   0),
12372           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 1, 0, 0, 0, 0,   -3,   0,    0,   1),
12373 
12374        /* 231-240 */
12375           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 11, 0, 0, 0, 0, 2,    0,  11,    5,   0),
12376           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,-11, 0, 0, 0, 0, 0,    9,   6,    0,   0),
12377           new PlanetaryNutModel( 0, 0, 0, 0,-1,  0,  4,  0, 0, 0, 0, 0, 2,   -4,  10,    4,   2),
12378           new PlanetaryNutModel( 0, 0, 0, 0, 1,  0, -4,  0, 0, 0, 0, 0, 0,    5,   3,    0,   0),
12379           new PlanetaryNutModel( 2, 0,-2, 1, 0, -3,  3,  0, 0, 0, 0, 0, 0,   16,   0,    0,  -9),
12380           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0, 0,-2, 0, 0, 0,   -3,   0,    0,   0),
12381           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -7,  9, 0, 0, 0, 0, 0,    0,   3,    2,  -1),
12382           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 4,-5, 0, 0, 2,    7,   0,    0,  -3),
12383           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 0,  -25,  22,    0,   0),
12384           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 1,   42, 223,  119, -22),
12385 
12386        /* 241-250 */
12387           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,  -27,-143,  -77,  14),
12388           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 1,    9,  49,   26,  -5),
12389           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 2,-1166,   0,    0, 505),
12390           new PlanetaryNutModel( 0, 2,-2, 2, 0,  0, -2,  0, 2, 0, 0, 0, 0,   -5,   0,    0,   2),
12391           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 5, 0, 0, 2,   -6,   0,    0,   3),
12392           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -5,  0, 0, 0, 0, 0, 0,   -8,   0,    1,   4),
12393           new PlanetaryNutModel( 0,-1, 1, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12394           new PlanetaryNutModel( 0, 2,-2, 1, 0, -3,  3,  0, 0, 0, 0, 0, 0,  117,   0,    0, -63),
12395           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2, -4, 0, 0, 0, 0, 0,   -4,   8,    4,   2),
12396           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -4,  4, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12397 
12398        /* 251-260 */
12399           new PlanetaryNutModel( 0, 1,-1, 2, 0, -5,  7,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   2),
12400           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -6, 0, 0, 0, 0, 0,    0,  31,    0,   0),
12401           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 1,   -5,   0,    1,   3),
12402           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -4,  6, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12403           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12404           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 2,  -24, -13,   -6,  10),
12405           new PlanetaryNutModel( 0,-1, 1, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12406           new PlanetaryNutModel( 0, 0, 0, 1, 0,  2, -3,  0, 0, 0, 0, 0, 0,    0, -32,  -17,   0),
12407           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  9, 0, 0, 0, 0, 2,    8,  12,    5,  -3),
12408           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  9, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12409 
12410        /* 261-270 */
12411           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -9, 0, 0, 0, 0, 0,    7,  13,    0,   0),
12412           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0,-2, 0, 0, 0, 0,   -3,  16,    0,   0),
12413           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,   50,   0,    0, -27),
12414           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -5,   -3,   0),
12415           new PlanetaryNutModel( 0,-2, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,   13,   0,    0,   0),
12416           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10,  0, 0, 0, 0, 0, 1,    0,   5,    3,   1),
12417           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10,  0, 0, 0, 0, 0, 2,   24,   5,    2, -11),
12418           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  3,  0, 0, 0, 0, 0, 2,    5, -11,   -5,  -2),
12419           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  3,  0, 0, 0, 0, 0, 1,   30,  -3,   -2, -16),
12420           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,   18,   0,    0,  -9),
12421 
12422        /* 271-280 */
12423           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -3,  0, 0, 0, 0, 0, 0,    8, 614,    0,   0),
12424           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -3,  0, 0, 0, 0, 0, 1,    3,  -3,   -1,  -2),
12425           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 1,    6,  17,    9,  -3),
12426           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 3, 0, 0, 0, 0,   -3,  -9,   -5,   2),
12427           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 1,    0,   6,    3,  -1),
12428           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 2, -127,  21,    9,  55),
12429           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 0, 0, 0, 0, 0,    3,   5,    0,   0),
12430           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8, 0, 0, 0, 0, 2,   -6, -10,   -4,   3),
12431           new PlanetaryNutModel( 0,-2, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,    5,   0,    0,   0),
12432           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  7, 0, 0, 0, 0, 2,   16,   9,    4,  -7),
12433 
12434        /* 281-290 */
12435           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  7, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12436           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -7, 0, 0, 0, 0, 0,    0,  22,    0,   0),
12437           new PlanetaryNutModel( 0, 0, 0, 1, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,  19,   10,   0),
12438           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,    7,   0,    0,  -4),
12439           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 10, 0, 0, 0, 0, 2,    0,  -5,   -2,   0),
12440           new PlanetaryNutModel( 0, 0, 0, 1, 0, -1,  2,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12441           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 4, 0, 0, 0, 2,   -9,   3,    1,   4),
12442           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  5, 0, 0, 0, 0, 2,   17,   0,    0,  -7),
12443           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  5, 0, 0, 0, 0, 1,    0,  -3,   -2,  -1),
12444           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -5, 0, 0, 0, 0, 0,  -20,  34,    0,   0),
12445 
12446        /* 291-300 */
12447           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -2,  0, 0, 0, 0, 0, 1,  -10,   0,    1,   5),
12448           new PlanetaryNutModel( 0, 1,-1, 1, 0,  1, -3,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   2),
12449           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -2,  0, 0, 0, 0, 0, 0,   22, -87,    0,   0),
12450           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  2,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12451           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  2,  0, 0, 0, 0, 0, 2,   -3,  -6,   -2,   1),
12452           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11,  0, 0, 0, 0, 0, 2,  -16,  -3,   -1,   7),
12453           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12454           new PlanetaryNutModel( 0,-2, 2, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12455           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -3, 0, 0, 0, 0, 0,  -68,  39,    0,   0),
12456           new PlanetaryNutModel( 0, 2,-2, 1, 0, -4,  4,  0, 0, 0, 0, 0, 0,   27,   0,    0, -14),
12457 
12458        /* 301-310 */
12459           new PlanetaryNutModel( 0,-1, 1, 0, 0,  4, -5,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12460           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -1, 0, 0, 0, 0, 0,  -25,   0,    0,   0),
12461           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  7,  0, 0, 0, 0, 0, 1,  -12,  -3,   -2,   6),
12462           new PlanetaryNutModel( 0, 1,-1, 1, 0, -4,  6,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12463           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  7,  0, 0, 0, 0, 0, 2,    3,  66,   29,  -1),
12464           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 2,  490,   0,    0,-213),
12465           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 1,  -22,  93,   49,  12),
12466           new PlanetaryNutModel( 0, 1,-1, 1, 0, -4,  5,  0, 0, 0, 0, 0, 0,   -7,  28,   15,   4),
12467           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 1,   -3,  13,    7,   2),
12468           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -6,  0, 0, 0, 0, 0, 0,  -46,  14,    0,   0),
12469 
12470        /* 311-320 */
12471           new PlanetaryNutModel(-2, 0, 2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12472           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  1, 0, 0, 0, 0, 0,    2,   1,    0,   0),
12473           new PlanetaryNutModel( 0,-1, 1, 0, 0,  1,  0,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12474           new PlanetaryNutModel( 0, 0, 0, 1, 0,  1, -1,  0, 0, 0, 0, 0, 0,  -28,   0,    0,  15),
12475           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 5, 0, 0, 0, 2,    5,   0,    0,  -2),
12476           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -3, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12477           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  3, 0, 0, 0, 0, 2,  -11,   0,    0,   5),
12478           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -7, 12, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12479           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  1,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12480           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  1,  0, 0, 0, 0, 0, 1,   25, 106,   57, -13),
12481 
12482        /* 321-330 */
12483           new PlanetaryNutModel( 0, 1,-1, 1, 0, -1,  0,  0, 0, 0, 0, 0, 0,    5,  21,   11,  -3),
12484           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0, 1485,   0,    0,   0),
12485           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 1,   -7, -32,  -17,   4),
12486           new PlanetaryNutModel( 0, 1,-1, 1, 0,  1, -2,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12487           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  5, 0, 0, 0, 0, 2,   -6,  -3,   -2,   3),
12488           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 4, 0, 0, 0, 2,   30,  -6,   -2, -13),
12489           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-4, 0, 0, 0, 0,   -4,   4,    0,   0),
12490           new PlanetaryNutModel( 0, 0, 0, 1, 0, -1,  1,  0, 0, 0, 0, 0, 0,  -19,   0,    0,  10),
12491           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 10, 0, 0, 0, 0, 2,    0,   4,    2,  -1),
12492           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 10, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12493 
12494        /* 331-340 */
12495           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -3,  0, 3, 0, 0, 0, 0,    4,   0,    0,  -2),
12496           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  7, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12497           new PlanetaryNutModel(-2, 0, 2, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12498           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  8, 0, 0, 0, 0, 2,    5,   3,    1,  -2),
12499           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 0, 0, 0, 0, 0,    0,  11,    0,   0),
12500           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 3, 0, 0, 0, 2,  118,   0,    0, -52),
12501           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 3, 0, 0, 0, 1,    0,  -5,   -3,   0),
12502           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-3, 0, 0, 0, 0,  -28,  36,    0,   0),
12503           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -4,  0, 0, 0, 0, 0, 0,    5,  -5,    0,   0),
12504           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  4,  0, 0, 0, 0, 0, 1,   14, -59,  -31,  -8),
12505 
12506        /* 341-350 */
12507           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,   9,    5,   1),
12508           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  4,  0, 0, 0, 0, 0, 2, -458,   0,    0, 198),
12509           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  9,  0, 0, 0, 0, 0, 2,    0, -45,  -20,   0),
12510           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  9,  0, 0, 0, 0, 0, 1,    9,   0,    0,  -5),
12511           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -9,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12512           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -4,   -2,  -1),
12513           new PlanetaryNutModel( 0, 2,-2, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,   11,   0,    0,  -6),
12514           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  6, 0, 0, 0, 0, 2,    6,   0,    0,  -2),
12515           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -6, 0, 0, 0, 0, 0,  -16,  23,    0,   0),
12516           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  -4,   -2,   0),
12517 
12518        /* 351-360 */
12519           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 2, 0, 0, 0, 2,   -5,   0,    0,   2),
12520           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-2, 0, 0, 0, 0, -166, 269,    0,   0),
12521           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1,  0,-1, 0, 0, 0, 0,   15,   0,    0,  -8),
12522           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  9,  0, 0, 0, 0, 0, 2,   10,   0,    0,  -4),
12523           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -4, 0, 0, 0, 0, 0,  -78,  45,    0,   0),
12524           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  4,  0, 0, 0, 0, 0, 2,    0,  -5,   -2,   0),
12525           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  4,  0, 0, 0, 0, 0, 1,    7,   0,    0,  -4),
12526           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,   -5, 328,    0,   0),
12527           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -4,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12528           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2, -2, 0, 0, 0, 0, 0,    5,   0,    0,  -2),
12529 
12530        /* 361-370 */
12531           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,    0,   3,    1,   0),
12532           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-3, 0, 0, 0,   -3,   0,    0,   0),
12533           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1,-5, 0, 0, 0,   -3,   0,    0,   0),
12534           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 1, 0, 0, 0, 1,    0,  -4,   -2,   0),
12535           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,-1223, -26,    0,   0),
12536           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 1,    0,   7,    3,   0),
12537           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-3, 5, 0, 0, 0,    3,   0,    0,   0),
12538           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12539           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-2, 0, 0, 0,   -6,  20,    0,   0),
12540           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0, -368,   0,    0,   0),
12541 
12542        /* 371-380 */
12543           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-1, 0, 0, 0,  -75,   0,    0,   0),
12544           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,   11,   0,    0,  -6),
12545           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -2,  2, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12546           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 14,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12547           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 2,-5, 0, 0, 0,  -13, -30,    0,   0),
12548           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 3, 0, 0, 0, 0,   21,   3,    0,   0),
12549           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 3, 0, 0, 0, 2,   -3,   0,    0,   1),
12550           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12551           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    8, -27,    0,   0),
12552           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -8, 3, 0, 0, 0, 0,  -19, -11,    0,   0),
12553 
12554        /* 381-390 */
12555           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  8,-3, 0, 0, 0, 2,   -4,   0,    0,   2),
12556           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-2, 5, 0, 0, 2,    0,   5,    2,   0),
12557           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12,  0, 0, 0, 0, 0, 2,   -6,   0,    0,   2),
12558           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12,  0, 0, 0, 0, 0, 0,   -8,   0,    0,   0),
12559           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1,-2, 0, 0, 0,   -1,   0,    0,   0),
12560           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 1, 0, 0, 2,  -14,   0,    0,   6),
12561           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  2, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12562           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  2, 0, 0, 0, 0, 2,  -74,   0,    0,  32),
12563           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 2, 0, 0, 2,    0,  -3,   -1,   0),
12564           new PlanetaryNutModel( 0, 2,-2, 1, 0, -5,  5,  0, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12565 
12566        /* 391-400 */
12567           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 0,    8,  11,    0,   0),
12568           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 1,    0,   3,    2,   0),
12569           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 2, -262,   0,    0, 114),
12570           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -6,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12571           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  6,  0, 0, 0, 0, 0, 1,   -7,   0,    0,   4),
12572           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  6,  0, 0, 0, 0, 0, 2,    0, -27,  -12,   0),
12573           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  4, 0, 0, 0, 0, 2,  -19,  -8,   -4,   8),
12574           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  7,  0, 0, 0, 0, 0, 2,  202,   0,    0, -87),
12575           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  7,  0, 0, 0, 0, 0, 1,   -8,  35,   19,   5),
12576           new PlanetaryNutModel( 0, 1,-1, 1, 0, -5,  6,  0, 0, 0, 0, 0, 0,    0,   4,    2,   0),
12577 
12578        /* 401-410 */
12579           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -7,  0, 0, 0, 0, 0, 0,   16,  -5,    0,   0),
12580           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,    5,   0,    0,  -3),
12581           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 1, 0, 0, 0, 0,    0,  -3,    0,   0),
12582           new PlanetaryNutModel( 0, 0, 0, 0,-1,  0,  3,  0, 0, 0, 0, 0, 2,    1,   0,    0,   0),
12583           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 2, 0, 0, 0, 2,  -35, -48,  -21,  15),
12584           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  6, 0, 0, 0, 0, 2,   -3,  -5,   -2,   1),
12585           new PlanetaryNutModel( 0, 0, 0, 1, 0,  2, -2,  0, 0, 0, 0, 0, 0,    6,   0,    0,  -3),
12586           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6,  9, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12587           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -9, 0, 0, 0, 0, 0,    0,  -5,    0,   0),
12588           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  2,  0, 0, 0, 0, 0, 1,   12,  55,   29,  -6),
12589 
12590        /* 411-420 */
12591           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  1,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12592           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0, -598,   0,    0,   0),
12593           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -2,  0, 0, 0, 0, 0, 1,   -3, -13,   -7,   1),
12594           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 3, 0, 0, 0, 2,   -5,  -7,   -3,   2),
12595           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  7, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12596           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -7, 0, 0, 0, 0, 0,    5,  -7,    0,   0),
12597           new PlanetaryNutModel( 0, 0, 0, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12598           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -5, 0, 0, 0, 0, 0,   16,  -6,    0,   0),
12599           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -3,  0, 0, 0, 0, 0, 0,    8,  -3,    0,   0),
12600           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  3,  0, 0, 0, 0, 0, 1,    8, -31,  -16,  -4),
12601 
12602        /* 421-430 */
12603           new PlanetaryNutModel( 0, 1,-1, 1, 0, -1,  2,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12604           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  3,  0, 0, 0, 0, 0, 2,  113,   0,    0, -49),
12605           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10,  0, 0, 0, 0, 0, 2,    0, -24,  -10,   0),
12606           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10,  0, 0, 0, 0, 0, 1,    4,   0,    0,  -2),
12607           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -3, 0, 0, 0, 0, 0,   27,   0,    0,   0),
12608           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  8,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12609           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  5,  0, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12610           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  5,  0, 0, 0, 0, 0, 1,    5,   0,    0,  -2),
12611           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -5,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12612           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  1, 0, 0, 0, 0, 2,  -13,   0,    0,   6),
12613 
12614        /* 431-440 */
12615           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  0, 5, 0, 0, 0, 2,    5,   0,    0,  -2),
12616           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  3, 0, 0, 0, 0, 2,  -18, -10,   -4,   8),
12617           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  0,  0, 0, 0, 0, 0, 0,   -4, -28,    0,   0),
12618           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  0,  0, 0, 0, 0, 0, 2,   -5,   6,    3,   2),
12619           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 13,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12620           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  5, 0, 0, 0, 0, 2,   -5,  -9,   -4,   2),
12621           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  0, 4, 0, 0, 0, 2,   17,   0,    0,  -7),
12622           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-4, 0, 0, 0, 0,   11,   4,    0,   0),
12623           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  7, 0, 0, 0, 0, 2,    0,  -6,   -2,   0),
12624           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   83,  15,    0,   0),
12625 
12626        /* 441-450 */
12627           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  5,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12628           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  5,  0, 0, 0, 0, 0, 2,    0,-114,  -49,   0),
12629           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  8,  0, 0, 0, 0, 0, 2,  117,   0,    0, -51),
12630           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  8,  0, 0, 0, 0, 0, 1,   -5,  19,   10,   2),
12631           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -8,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12632           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   2),
12633           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  9, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12634           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -6, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12635           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -6, 0, 0, 0, 0, 2,    0,  -6,   -2,   0),
12636           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,  393,   3,    0,   0),
12637 
12638        /* 451-460 */
12639           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 1,   -4,  21,   11,   2),
12640           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 2,   -6,   0,   -1,   3),
12641           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 10,  0, 0, 0, 0, 0, 2,   -3,   8,    4,   1),
12642           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -4, 0, 0, 0, 0, 0,    8,   0,    0,   0),
12643           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -4, 0, 0, 0, 0, 2,   18, -29,  -13,  -8),
12644           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  3,  0, 0, 0, 0, 0, 1,    8,  34,   18,  -4),
12645           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,   89,   0,    0,   0),
12646           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 1,    3,  12,    6,  -1),
12647           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 2,   54, -15,   -7, -24),
12648           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-3, 0, 0, 0,    0,   3,    0,   0),
12649 
12650        /* 461-470 */
12651           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 13, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12652           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-1, 0, 0, 0, 0,    0,  35,    0,   0),
12653           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-1, 0, 0, 0, 2, -154, -30,  -13,  67),
12654           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-2, 0, 0, 0,   15,   0,    0,   0),
12655           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-2, 0, 0, 1,    0,   4,    2,   0),
12656           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -2, 0, 0, 0, 0, 0,    0,   9,    0,   0),
12657           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -2, 0, 0, 0, 0, 2,   80, -71,  -31, -35),
12658           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-1, 0, 0, 2,    0, -20,   -9,   0),
12659           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 15, 0, 0, 0, 0, 2,   11,   5,    2,  -5),
12660           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 15,  0, 0, 0, 0, 0, 2,   61, -96,  -42, -27),
12661 
12662        /* 471-480 */
12663           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  9, -4, 0, 0, 0, 0, 2,   14,   9,    4,  -6),
12664           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 2,-5, 0, 0, 2,  -11,  -6,   -3,   5),
12665           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-1,-5, 0, 0, 2,    0,  -3,   -1,   0),
12666           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -8, 3, 0, 0, 0, 2,  123,-415, -180, -53),
12667           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 0,    0,   0,    0, -35),
12668           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12669           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 1,    7, -32,  -17,  -4),
12670           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -9,   -5,   0),
12671           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 1,    0,  -4,    2,   0),
12672           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 2,  -89,   0,    0,  38),
12673 
12674        /* 481-490 */
12675           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 16,-4,-5, 0, 0, 2,    0, -86,  -19,  -6),
12676           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-3, 0, 0, 0, 2,    0,   0,  -19,   6),
12677           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-3, 0, 0, 0, 2, -123,-416, -180,  53),
12678           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -8, 1, 5, 0, 0, 2,    0,  -3,   -1,   0),
12679           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 5, 0, 0, 2,   12,  -6,   -3,  -5),
12680           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  4, 0, 0, 0, 0, 2,  -13,   9,    4,   6),
12681           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 2,    0, -15,   -7,   0),
12682           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12683           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 2,  -62, -97,  -42,  27),
12684           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, 11,  0, 0, 0, 0, 0, 2,  -11,   5,    2,   5),
12685 
12686        /* 491-500 */
12687           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 1, 0, 0, 2,    0, -19,   -8,   0),
12688           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 2, 0, 0, 0, 2,   -3,   0,    0,   1),
12689           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   4,    2,   0),
12690           new PlanetaryNutModel( 0, 1,-1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12691           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   4,    2,   0),
12692           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  2, 0, 0, 0, 0, 2,  -85, -70,  -31,  37),
12693           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 1, 0, 0, 0, 2,  163, -12,   -5, -72),
12694           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  7,  0, 0, 0, 0, 0, 2,  -63, -16,   -7,  28),
12695           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  4, 0, 0, 0, 0, 2,  -21, -32,  -14,   9),
12696           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  0, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12697 
12698        /* 501-510 */
12699           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12700           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -6,  0, 0, 0, 0, 0, 0,    0,   8,    0,   0),
12701           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -6,  0, 0, 0, 0, 0, 2,    3,  10,    4,  -1),
12702           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 2, 0, 0, 0, 2,    3,   0,    0,  -1),
12703           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  6, 0, 0, 0, 0, 2,    0,  -7,   -3,   0),
12704           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -9, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12705           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -1,  0, 0, 0, 0, 0, 0,    6,  19,    0,   0),
12706           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -1,  0, 0, 0, 0, 0, 2,    5,-173,  -75,  -2),
12707           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -7, 0, 0, 0, 0, 2,    0,  -7,   -3,   0),
12708           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -5, 0, 0, 0, 0, 2,    7, -12,   -5,  -3),
12709 
12710        /* 511-520 */
12711           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  4,  0, 0, 0, 0, 0, 1,   -3,   0,    0,   2),
12712           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  4,  0, 0, 0, 0, 0, 2,    3,  -4,   -2,  -1),
12713           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  9,  0, 0, 0, 0, 0, 2,   74,   0,    0, -32),
12714           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  9,  0, 0, 0, 0, 0, 1,   -3,  12,    6,   2),
12715           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -3, 0, 0, 0, 0, 2,   26, -14,   -6, -11),
12716           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -1, 0, 0, 0, 0, 2,   19,   0,    0,  -8),
12717           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  4,  0, 0, 0, 0, 0, 1,    6,  24,   13,  -3),
12718           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,   83,   0,    0,   0),
12719           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 1,    0, -10,   -5,   0),
12720           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 2,   11,  -3,   -1,  -5),
12721 
12722        /* 521-530 */
12723           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  1, 0, 0, 0, 0, 2,    3,   0,    1,  -1),
12724           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  0, 5, 0, 0, 0, 2,    3,   0,    0,  -1),
12725           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12726           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 1,    5, -23,  -12,  -3),
12727           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 2, -339,   0,    0, 147),
12728           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 12,  0, 0, 0, 0, 0, 2,    0, -10,   -5,   0),
12729           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-4, 0, 0, 0, 0,    5,   0,    0,   0),
12730           new PlanetaryNutModel( 0, 2,-2, 1, 0,  1, -1,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12731           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -8, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12732           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-3, 0, 0, 0, 0,   18,  -3,    0,   0),
12733 
12734        /* 531-540 */
12735           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-3, 0, 0, 0, 2,    9, -11,   -5,  -4),
12736           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  6,  0, 0, 0, 0, 0, 2,   -8,   0,    0,   4),
12737           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  7,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12738           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -7,  0, 0, 0, 0, 0, 0,    0,   9,    0,   0),
12739           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -6, 0, 0, 0, 0, 2,    6,  -9,   -4,  -2),
12740           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-2, 0, 0, 0, 0,   -4, -12,    0,   0),
12741           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-2, 0, 0, 0, 2,   67, -91,  -39, -29),
12742           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -4, 0, 0, 0, 0, 2,   30, -18,   -8, -13),
12743           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -2,  0, 0, 0, 0, 0, 0,    0,   0,    0,   0),
12744           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -2,  0, 0, 0, 0, 0, 2,    0,-114,  -50,   0),
12745 
12746        /* 541-550 */
12747           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-1, 0, 0, 0, 2,    0,   0,    0,  23),
12748           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-1, 0, 0, 0, 2,  517,  16,    7,-224),
12749           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0,-2, 0, 0, 2,    0,  -7,   -3,   0),
12750           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -2, 0, 0, 0, 0, 2,  143,  -3,   -1, -62),
12751           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0,-1, 0, 0, 2,   29,   0,    0, -13),
12752           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,  1,  0,-1, 0, 0, 0, 0,   -4,   0,    0,   2),
12753           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 16,  0, 0, 0, 0, 0, 2,   -6,   0,    0,   3),
12754           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 2,-5, 0, 0, 2,    5,  12,    5,  -2),
12755           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -8, 3, 0, 0, 0, 2,  -25,   0,    0,  11),
12756           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 16,-4,-5, 0, 0, 2,   -3,   0,    0,   1),
12757 
12758        /* 551-560 */
12759           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0, 0, 0, 0, 2,    0,   4,    2,   0),
12760           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  8,-3, 0, 0, 0, 2,  -22,  12,    5,  10),
12761           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 2,   50,   0,    0, -22),
12762           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 1,    0,   7,    4,   0),
12763           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12764           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  2, 0, 0, 0, 0, 2,   -4,   4,    2,   2),
12765           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 1, 0, 0, 0, 2,   -5, -11,   -5,   2),
12766           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  8,  0, 0, 0, 0, 0, 2,    0,   4,    2,   0),
12767           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  5,  0, 0, 0, 0, 0, 1,    4,  17,    9,  -2),
12768           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 0,   59,   0,    0,   0),
12769 
12770        /* 561-570 */
12771           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 1,    0,  -4,   -2,   0),
12772           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 2,   -8,   0,    0,   4),
12773           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12774           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 1,    4, -15,   -8,  -2),
12775           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 2,  370,  -8,    0,-160),
12776           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -7, 0, 0, 0, 0, 2,    0,   0,   -3,   0),
12777           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -7, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12778           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -5, 0, 0, 0, 0, 2,   -6,   3,    1,   3),
12779           new PlanetaryNutModel( 0, 0, 0, 0, 0,  7, -8,  0, 0, 0, 0, 0, 0,    0,   6,    0,   0),
12780           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -3, 0, 0, 0, 0, 2,  -10,   0,    0,   4),
12781 
12782        /* 571-580 */
12783           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -3,  0, 0, 0, 0, 0, 2,    0,   9,    4,   0),
12784           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  2,  0, 0, 0, 0, 0, 2,    4,  17,    7,  -2),
12785           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11,  0, 0, 0, 0, 0, 2,   34,   0,    0, -15),
12786           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11,  0, 0, 0, 0, 0, 1,    0,   5,    3,   0),
12787           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-4, 0, 0, 0, 2,   -5,   0,    0,   2),
12788           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-3, 0, 0, 0, 2,  -37,  -7,   -3,  16),
12789           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  6,  0, 0, 0, 0, 0, 1,    3,  13,    7,  -2),
12790           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -6,  0, 0, 0, 0, 0, 0,   40,   0,    0,   0),
12791           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -6,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12792           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-2, 0, 0, 0, 2, -184,  -3,   -1,  80),
12793 
12794        /* 581-590 */
12795           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -4, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12796           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12797           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 1,    0, -10,   -6,  -1),
12798           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 2,   31,  -6,    0, -13),
12799           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-1, 0, 0, 0, 2,   -3, -32,  -14,   1),
12800           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0, 0,-2, 0, 0, 2,   -7,   0,    0,   3),
12801           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -2, 0, 0, 0, 0, 2,    0,  -8,   -4,   0),
12802           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0, 0, 0, 0, 0, 0,    3,  -4,    0,   0),
12803           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8, -9,  0, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12804           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -4,  0, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12805 
12806        /* 591-600 */
12807           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 2,   19, -23,  -10,   2),
12808           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 1,    0,   0,    0, -10),
12809           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 1,    0,   3,    2,   0),
12810           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  7,  0, 0, 0, 0, 0, 1,    0,   9,    5,  -1),
12811           new PlanetaryNutModel( 0, 0, 0, 0, 0,  7, -7,  0, 0, 0, 0, 0, 0,   28,   0,    0,   0),
12812           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 1,    0,  -7,   -4,   0),
12813           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 2,    8,  -4,    0,  -4),
12814           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 0,    0,   0,   -2,   0),
12815           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12816           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-4, 0, 0, 0, 2,   -3,   0,    0,   1),
12817 
12818        /* 601-610 */
12819           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-3, 0, 0, 0, 2,   -9,   0,    1,   4),
12820           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-2, 0, 0, 0, 2,    3,  12,    5,  -1),
12821           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3,  0,  0, 0, 0, 0, 0, 2,   17,  -3,   -1,   0),
12822           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8,  8,  0, 0, 0, 0, 0, 1,    0,   7,    4,   0),
12823           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8, -8,  0, 0, 0, 0, 0, 0,   19,   0,    0,   0),
12824           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -3,  0, 0, 0, 0, 0, 1,    0,  -5,   -3,   0),
12825           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -3,  0, 0, 0, 0, 0, 2,   14,  -3,    0,  -1),
12826           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   0,   -1,   0),
12827           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   0,    0,  -5),
12828           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   5,    3,   0),
12829 
12830        /* 611-620 */
12831           new PlanetaryNutModel( 0, 0, 0, 0, 0,  9, -9,  0, 0, 0, 0, 0, 0,   13,   0,    0,   0),
12832           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -4,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12833           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    2,   9,    4,   3),
12834           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    0,   0,    0,  -4),
12835           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    8,   0,    0,   0),
12836           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 1,    0,   4,    2,   0),
12837           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    6,   0,    0,  -3),
12838           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12839           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 1,    0,   3,    1,   0),
12840           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    5,   0,    0,  -2),
12841 
12842        /* 621-630 */
12843           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12844           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   0),
12845           new PlanetaryNutModel( 1, 0,-2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12846           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    7,   0,    0,   0),
12847           new PlanetaryNutModel( 1, 0,-2, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12848           new PlanetaryNutModel(-1, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12849           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,    6,   0,    0,   0),
12850           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -4,    0,   0),
12851           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -4,    0,   0),
12852           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    5,   0,    0,   0),
12853 
12854        /* 631-640 */
12855           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   -3,   0,    0,   0),
12856           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    4,   0,    0,   0),
12857           new PlanetaryNutModel(-1, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12858           new PlanetaryNutModel(-1, 0, 2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12859           new PlanetaryNutModel( 1,-1, 1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12860           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   13,   0,    0,   0),
12861           new PlanetaryNutModel(-2, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   21,  11,    0,   0),
12862           new PlanetaryNutModel( 1, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -5,    0,   0),
12863           new PlanetaryNutModel(-1, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 0, 0,    0,  -5,   -2,   0),
12864           new PlanetaryNutModel( 1, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12865 
12866        /* 641-650 */
12867           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -5,    0,   0),
12868           new PlanetaryNutModel(-1, 0, 2, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   2),
12869           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   20,  10,    0,   0),
12870           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,  -34,   0,    0,   0),
12871           new PlanetaryNutModel(-1, 0, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,  -19,   0,    0,   0),
12872           new PlanetaryNutModel( 1, 0,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,    3,   0,    0,  -2),
12873           new PlanetaryNutModel( 1, 2,-2, 2, 0, -3,  3,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12874           new PlanetaryNutModel( 1, 2,-2, 2, 0,  0, -2,  0, 2, 0, 0, 0, 0,   -6,   0,    0,   3),
12875           new PlanetaryNutModel( 1, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12876           new PlanetaryNutModel( 1, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    3,   0,    0,   0),
12877 
12878        /* 651-660 */
12879           new PlanetaryNutModel( 0, 0,-2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12880           new PlanetaryNutModel( 0, 0,-2, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    4,   0,    0,   0),
12881           new PlanetaryNutModel( 0, 2, 0, 2, 0, -2,  2,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12882           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    6,   0,    0,  -3),
12883           new PlanetaryNutModel( 0, 2, 0, 2, 0, -1,  1,  0, 0, 0, 0, 0, 0,   -8,   0,    0,   3),
12884           new PlanetaryNutModel( 0, 2, 0, 2, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12885           new PlanetaryNutModel( 0, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   0),
12886           new PlanetaryNutModel( 0, 1, 1, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -3,   -2,   0),
12887           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,  126, -63,  -27, -55),
12888           new PlanetaryNutModel(-1, 2, 0, 2, 0, 10, -3,  0, 0, 0, 0, 0, 0,   -5,   0,    1,   2),
12889 
12890        /* 661-670 */
12891           new PlanetaryNutModel( 0, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,   -3,  28,   15,   2),
12892           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,    5,   0,    1,  -2),
12893           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   9,    4,   1),
12894           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   9,    4,  -1),
12895           new PlanetaryNutModel(-1, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0, -126, -63,  -27,  55),
12896           new PlanetaryNutModel( 2, 2,-2, 2, 0,  0, -2,  0, 3, 0, 0, 0, 0,    3,   0,    0,  -1),
12897           new PlanetaryNutModel( 1, 2, 0, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,   21, -11,   -6, -11),
12898           new PlanetaryNutModel( 0, 1, 1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12899           new PlanetaryNutModel(-1, 2, 0, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,  -21, -11,   -6,  11),
12900           new PlanetaryNutModel(-2, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   1),
12901 
12902        /* 671-680 */
12903           new PlanetaryNutModel( 0, 2, 0, 2, 0,  2, -3,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12904           new PlanetaryNutModel( 0, 2, 0, 2, 0,  1, -1,  0, 0, 0, 0, 0, 0,    8,   0,    0,  -4),
12905           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  1,  0,-1, 0, 0, 0, 0,   -6,   0,    0,   3),
12906           new PlanetaryNutModel( 0, 2, 0, 2, 0,  2, -2,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12907           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    3,   0,    0,  -1),
12908           new PlanetaryNutModel( 1, 2, 0, 2, 0, -1,  1,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12909           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0,  2,  0,-3, 0, 0, 0, 0,   -5,   0,    0,   2),
12910           new PlanetaryNutModel( 2, 2, 0, 2, 0,  0,  2,  0,-3, 0, 0, 0, 0,   24, -12,   -5, -11),
12911           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   3,    1,   0),
12912           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   3,    1,   0),
12913 
12914        /* 681-687 */
12915           new PlanetaryNutModel( 1, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12916           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,  -24, -12,   -5,  10),
12917           new PlanetaryNutModel( 2, 2, 0, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    4,   0,   -1,  -2),
12918           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,   13,   0,    0,  -6),
12919           new PlanetaryNutModel(-1, 2, 2, 2, 0,  3, -3,  0, 0, 0, 0, 0, 0,    7,   0,    0,  -3),
12920           new PlanetaryNutModel( 1, 2, 0, 2, 0,  1, -1,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12921           new PlanetaryNutModel( 0, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,    3,   0,    0,  -1)
12922        };
12923 
12924     /* Number of terms in the planetary nutation model */
12925        final int NPL = xpl.length;
12926 
12927     /*--------------------------------------------------------------------*/
12928 
12929     /* Interval between fundamental date J2000.0 and given date (JC). */
12930        t = ((date1 - DJ00) + date2) / DJC;
12931 
12932     /* ------------------- */
12933     /* LUNI-SOLAR NUTATION */
12934     /* ------------------- */
12935 
12936     /* Fundamental (Delaunay) arguments */
12937 
12938     /* Mean anomaly of the Moon (IERS 2003). */
12939        el = jauFal03(t);
12940 
12941     /* Mean anomaly of the Sun (MHB2000). */
12942        elp = fmod(1287104.79305  +
12943                 t * (129596581.0481  +
12944                 t * (-0.5532  +
12945                 t * (0.000136  +
12946                 t * (-0.00001149)))), TURNAS) * DAS2R;
12947 
12948     /* Mean longitude of the Moon minus that of the ascending node */
12949     /* (IERS 2003. */
12950        f = jauFaf03(t);
12951 
12952     /* Mean elongation of the Moon from the Sun (MHB2000). */
12953        d = fmod(1072260.70369  +
12954               t * (1602961601.2090  +
12955               t * (-6.3706  +
12956               t * (0.006593  +
12957               t * (-0.00003169)))), TURNAS) * DAS2R;
12958 
12959     /* Mean longitude of the ascending node of the Moon (IERS 2003). */
12960        om = jauFaom03(t);
12961 
12962     /* Initialize the nutation values. */
12963        dp = 0.0;
12964        de = 0.0;
12965 
12966     /* Summation of luni-solar nutation series (in reverse order). */
12967        for (i = NLS-1; i >= 0; i--) {
12968 
12969        /* Argument and functions. */
12970           arg = fmod((double)xls[i].nl  * el +
12971                      (double)xls[i].nlp * elp +
12972                      (double)xls[i].nf  * f +
12973                      (double)xls[i].nd  * d +
12974                      (double)xls[i].nom * om, D2PI);
12975           sarg = sin(arg);
12976           carg = cos(arg);
12977 
12978        /* Term. */
12979           dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg;
12980           de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg;
12981        }
12982 
12983     /* Convert from 0.1 microarcsec units to radians. */
12984        dpsils = dp * U2R;
12985        depsls = de * U2R;
12986 
12987     /* ------------------ */
12988     /* PLANETARY NUTATION */
12989     /* ------------------ */
12990 
12991     /* n.b.  The MHB2000 code computes the luni-solar and planetary nutation */
12992     /* in different functions, using slightly different Delaunay */
12993     /* arguments in the two cases.  This behaviour is faithfully */
12994     /* reproduced here.  Use of the IERS 2003 expressions for both */
12995     /* cases leads to negligible changes, well below */
12996     /* 0.1 microarcsecond. */
12997 
12998     /* Mean anomaly of the Moon (MHB2000). */
12999        al = fmod(2.35555598 + 8328.6914269554 * t, D2PI);
13000 
13001     /* Mean longitude of the Moon minus that of the ascending node */
13002     /*(MHB2000). */
13003        af = fmod(1.627905234 + 8433.466158131 * t, D2PI);
13004 
13005     /* Mean elongation of the Moon from the Sun (MHB2000). */
13006        ad = fmod(5.198466741 + 7771.3771468121 * t, D2PI);
13007 
13008     /* Mean longitude of the ascending node of the Moon (MHB2000). */
13009        aom = fmod(2.18243920 - 33.757045 * t, D2PI);
13010 
13011     /* General accumulated precession in longitude (IERS 2003). */
13012        apa = jauFapa03(t);
13013 
13014     /* Planetary longitudes, Mercury through Uranus (IERS 2003). */
13015        alme = jauFame03(t);
13016        alve = jauFave03(t);
13017        alea = jauFae03(t);
13018        alma = jauFama03(t);
13019        alju = jauFaju03(t);
13020        alsa = jauFasa03(t);
13021        alur = jauFaur03(t);
13022 
13023     /* Neptune longitude (MHB2000). */
13024        alne = fmod(5.321159000 + 3.8127774000 * t, D2PI);
13025 
13026     /* Initialize the nutation values. */
13027        dp = 0.0;
13028        de = 0.0;
13029 
13030     /* Summation of planetary nutation series (in reverse order). */
13031        for (i = NPL-1; i >= 0; i--) {
13032 
13033        /* Argument and functions. */
13034           arg = fmod((double)xpl[i].nl  * al   +
13035                      (double)xpl[i].nf  * af   +
13036                      (double)xpl[i].nd  * ad   +
13037                      (double)xpl[i].nom * aom  +
13038                      (double)xpl[i].nme * alme +
13039                      (double)xpl[i].nve * alve +
13040                      (double)xpl[i].nea * alea +
13041                      (double)xpl[i].nma * alma +
13042                      (double)xpl[i].nju * alju +
13043                      (double)xpl[i].nsa * alsa +
13044                      (double)xpl[i].nur * alur +
13045                      (double)xpl[i].nne * alne +
13046                      (double)xpl[i].npa * apa, D2PI);
13047           sarg = sin(arg);
13048           carg = cos(arg);
13049 
13050        /* Term. */
13051           dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg;
13052           de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg;
13053 
13054        }
13055 
13056     /* Convert from 0.1 microarcsec units to radians. */
13057        dpsipl = dp * U2R;
13058        depspl = de * U2R;
13059 
13060     /* ------- */
13061     /* RESULTS */
13062     /* ------- */
13063 
13064     /* Add luni-solar and planetary components. */
13065        return new NutationTerms( dpsils + dpsipl,
13066                                depsls + depspl);
13067        }
13068     
13069 
13070     /**
13071     *  Nutation, IAU 2000B model.
13072     *
13073     *<p>This function is derived from the International Astronomical Union's
13074     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13075     *
13076     *<p>Status:  canonical model.
13077     *
13078     *<!-- Given: -->
13079     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13080     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13081     *
13082     *<!-- Returned: -->
13083     *     @return  nutation, luni-solar + planetary (Note 2)
13084     *
13085     * <p>Notes:
13086     * <ol>
13087     *
13088     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13089     *     convenient way between the two arguments.  For example,
13090     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13091     *     among others:
13092     *<pre>
13093     *            date1          date2
13094     *
13095     *         2450123.7           0.0       (JD method)
13096     *         2451545.0       -1421.3       (J2000 method)
13097     *         2400000.5       50123.2       (MJD method)
13098     *         2450123.5           0.2       (date &amp; time method)
13099     *</pre>
13100     *     The JD method is the most natural and convenient to use in
13101     *     cases where the loss of several decimal digits of resolution
13102     *     is acceptable.  The J2000 method is best matched to the way
13103     *     the argument is handled internally and will deliver the
13104     *     optimum resolution.  The MJD method and the date &amp; time methods
13105     *     are both good compromises between resolution and convenience.
13106     *
13107     * <li> The nutation components in longitude and obliquity are in radians
13108     *     and with respect to the equinox and ecliptic of date.  The
13109     *     obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
13110     *     value of 84381.448 arcsec.  (The errors that result from using
13111     *     this function with the IAU 2006 value of 84381.406 arcsec can be
13112     *     neglected.)
13113     *
13114     *     The nutation model consists only of luni-solar terms, but
13115     *     includes also a fixed offset which compensates for certain long-
13116     *     period planetary terms (Note 7).
13117     *
13118     * <li> This function is an implementation of the IAU 2000B abridged
13119     *     nutation model formally adopted by the IAU General Assembly in
13120     *     2000.  The function computes the MHB_2000_SHORT luni-solar
13121     *     nutation series (Luzum 2001), but without the associated
13122     *     corrections for the precession rate adjustments and the offset
13123     *     between the GCRS and J2000.0 mean poles.
13124     *
13125     * <li> The full IAU 2000A (MHB2000) nutation model contains nearly 1400
13126     *     terms.  The IAU 2000B model (McCarthy &amp; Luzum 2003) contains only
13127     *     77 terms, plus additional simplifications, yet still delivers
13128     *     results of 1 mas accuracy at present epochs.  This combination of
13129     *     accuracy and size makes the IAU 2000B abridged nutation model
13130     *     suitable for most practical applications.
13131     *
13132     *     The function delivers a pole accurate to 1 mas from 1900 to 2100
13133     *     (usually better than 1 mas, very occasionally just outside
13134     *     1 mas).  The full IAU 2000A model, which is implemented in the
13135     *     function jauNut00a (q.v.), delivers considerably greater accuracy
13136     *     at current dates;  however, to realize this improved accuracy,
13137     *     corrections for the essentially unpredictable free-core-nutation
13138     *     (FCN) must also be included.
13139     *
13140     * <li> The present function provides classical nutation.  The
13141     *     MHB_2000_SHORT algorithm, from which it is adapted, deals also
13142     *     with (i) the offsets between the GCRS and mean poles and (ii) the
13143     *     adjustments in longitude and obliquity due to the changed
13144     *     precession rates.  These additional functions, namely frame bias
13145     *     and precession adjustments, are supported by the JSOFA functions
13146     *     jauBi00  and jauPr00.
13147     *
13148     * <li> The MHB_2000_SHORT algorithm also provides "total" nutations,
13149     *     comprising the arithmetic sum of the frame bias, precession
13150     *     adjustments, and nutation (luni-solar + planetary).  These total
13151     *     nutations can be used in combination with an existing IAU 1976
13152     *     precession implementation, such as jauPmat76,  to deliver GCRS-
13153     *     to-true predictions of mas accuracy at current epochs.  However,
13154     *     for symmetry with the jauNut00a  function (q.v. for the reasons),
13155     *     the JSOFA functions do not generate the "total nutations"
13156     *     directly.  Should they be required, they could of course easily
13157     *     be generated by calling jauBi00, jauPr00 and the present function
13158     *     and adding the results.
13159     *
13160     * <li> The IAU 2000B model includes "planetary bias" terms that are
13161     *     fixed in size but compensate for long-period nutations.  The
13162     *     amplitudes quoted in McCarthy &amp; Luzum (2003), namely
13163     *     Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for
13164     *     the "total nutations" method described in Note 6.  The Luzum
13165     *     (2001) values used in this JSOFA implementation, namely -0.135 mas
13166     *     and +0.388 mas, are optimized for the "rigorous" method, where
13167     *     frame bias, precession and nutation are applied separately and in
13168     *     that order.  During the interval 1995-2050, the JSOFA
13169     *     implementation delivers a maximum error of 1.001 mas (not
13170     *     including FCN).
13171     *</ol>
13172     *<p>References:
13173     *
13174     *     <p>Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions
13175     *     for the precession quantities based upon the IAU /1976/ system of
13176     *     astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)
13177     *
13178     *     <p>Luzum, B., private communication, 2001 (Fortran code
13179     *     MHB_2000_SHORT)
13180     *
13181     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
13182     *     precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.
13183     *     85, 37-49 (2003)
13184     *
13185     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13186     *     Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)
13187     *
13188     *@version 2009 December 17
13189     *
13190     *  @since Release 20101201
13191     *
13192     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13193     */
13194     public static NutationTerms jauNut00b(double date1, double date2)
13195     {
13196        double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
13197               dpsils, depsls, dpsipl, depspl;
13198        int i;
13199 
13200     /* Units of 0.1 microarcsecond to radians */
13201        final double U2R = DAS2R / 1e7;
13202 
13203     /* ---------------------------------------- */
13204     /* Fixed offsets in lieu of planetary terms */
13205     /* ---------------------------------------- */
13206 
13207        final double DPPLAN = -0.135 * DMAS2R;
13208        final double DEPLAN =  0.388 * DMAS2R;
13209 
13210     /* --------------------------------------------------- */
13211     /* Luni-solar nutation: argument and term coefficients */
13212     /* --------------------------------------------------- */
13213 
13214     /* The units for the sine and cosine coefficients are */
13215     /* 0.1 microarcsec and the same per Julian century    */
13216 
13217         final class LSNutationModel 
13218         {
13219           final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13220           final double ps,pst,pc;     /* longitude sin, t*sin, cos coefficients */
13221           final double ec,ect,es;     /* obliquity cos, t*cos, sin coefficients */
13222           
13223           public LSNutationModel( int nl,int nlp,int nf,int nd,int nom,
13224           double ps, double pst, double pc,    
13225           double ec, double ect, double es    ) {
13226                this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13227                this.ps = ps;this.pst = pst;this.pc = pc;    
13228                this.ec = ec;this.ect = ect; this.es= es;    
13229         }
13230 
13231        }
13232         LSNutationModel x[] = {
13233 
13234        /* 1-10 */
13235           new LSNutationModel( 0, 0, 0, 0,1,
13236              -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
13237           new LSNutationModel( 0, 0, 2,-2,2,
13238                -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
13239           new LSNutationModel( 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0),
13240           new LSNutationModel( 0, 0, 0, 0,2,2074554.0,  207.0, -698.0,-897492.0, 470.0,-291.0),
13241           new LSNutationModel( 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0),
13242           new LSNutationModel( 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0),
13243           new LSNutationModel( 1, 0, 0, 0,0, 711159.0,   73.0, -872.0,  -6750.0,   0.0, 358.0),
13244           new LSNutationModel( 0, 0, 2, 0,1,-387298.0, -367.0,  380.0, 200728.0,  18.0, 318.0),
13245           new LSNutationModel( 1, 0, 2, 0,2,-301461.0,  -36.0,  816.0, 129025.0, -63.0, 367.0),
13246           new LSNutationModel( 0,-1, 2,-2,2, 215829.0, -494.0,  111.0, -95929.0, 299.0, 132.0),
13247 
13248        /* 11-20 */
13249           new LSNutationModel( 0, 0, 2,-2,1, 128227.0,  137.0,  181.0, -68982.0,  -9.0,  39.0),
13250           new LSNutationModel(-1, 0, 2, 0,2, 123457.0,   11.0,   19.0, -53311.0,  32.0,  -4.0),
13251           new LSNutationModel(-1, 0, 0, 2,0, 156994.0,   10.0, -168.0,  -1235.0,   0.0,  82.0),
13252           new LSNutationModel( 1, 0, 0, 0,1,  63110.0,   63.0,   27.0, -33228.0,   0.0,  -9.0),
13253           new LSNutationModel(-1, 0, 0, 0,1, -57976.0,  -63.0, -189.0,  31429.0,   0.0, -75.0),
13254           new LSNutationModel(-1, 0, 2, 2,2, -59641.0,  -11.0,  149.0,  25543.0, -11.0,  66.0),
13255           new LSNutationModel( 1, 0, 2, 0,1, -51613.0,  -42.0,  129.0,  26366.0,   0.0,  78.0),
13256           new LSNutationModel(-2, 0, 2, 0,1,  45893.0,   50.0,   31.0, -24236.0, -10.0,  20.0),
13257           new LSNutationModel( 0, 0, 0, 2,0,  63384.0,   11.0, -150.0,  -1220.0,   0.0,  29.0),
13258           new LSNutationModel( 0, 0, 2, 2,2, -38571.0,   -1.0,  158.0,  16452.0, -11.0,  68.0),
13259 
13260        /* 21-30 */
13261           new LSNutationModel( 0,-2, 2,-2,2,  32481.0,    0.0,    0.0, -13870.0,   0.0,   0.0),
13262           new LSNutationModel(-2, 0, 0, 2,0, -47722.0,    0.0,  -18.0,    477.0,   0.0, -25.0),
13263           new LSNutationModel( 2, 0, 2, 0,2, -31046.0,   -1.0,  131.0,  13238.0, -11.0,  59.0),
13264           new LSNutationModel( 1, 0, 2,-2,2,  28593.0,    0.0,   -1.0, -12338.0,  10.0,  -3.0),
13265           new LSNutationModel(-1, 0, 2, 0,1,  20441.0,   21.0,   10.0, -10758.0,   0.0,  -3.0),
13266           new LSNutationModel( 2, 0, 0, 0,0,  29243.0,    0.0,  -74.0,   -609.0,   0.0,  13.0),
13267           new LSNutationModel( 0, 0, 2, 0,0,  25887.0,    0.0,  -66.0,   -550.0,   0.0,  11.0),
13268           new LSNutationModel( 0, 1, 0, 0,1, -14053.0,  -25.0,   79.0,   8551.0,  -2.0, -45.0),
13269           new LSNutationModel(-1, 0, 0, 2,1,  15164.0,   10.0,   11.0,  -8001.0,   0.0,  -1.0),
13270           new LSNutationModel( 0, 2, 2,-2,2, -15794.0,   72.0,  -16.0,   6850.0, -42.0,  -5.0),
13271 
13272        /* 31-40 */
13273           new LSNutationModel( 0, 0,-2, 2,0,  21783.0,    0.0,   13.0,   -167.0,   0.0,  13.0),
13274           new LSNutationModel( 1, 0, 0,-2,1, -12873.0,  -10.0,  -37.0,   6953.0,   0.0, -14.0),
13275           new LSNutationModel( 0,-1, 0, 0,1, -12654.0,   11.0,   63.0,   6415.0,   0.0,  26.0),
13276           new LSNutationModel(-1, 0, 2, 2,1, -10204.0,    0.0,   25.0,   5222.0,   0.0,  15.0),
13277           new LSNutationModel( 0, 2, 0, 0,0,  16707.0,  -85.0,  -10.0,    168.0,  -1.0,  10.0),
13278           new LSNutationModel( 1, 0, 2, 2,2,  -7691.0,    0.0,   44.0,   3268.0,   0.0,  19.0),
13279           new LSNutationModel(-2, 0, 2, 0,0, -11024.0,    0.0,  -14.0,    104.0,   0.0,   2.0),
13280           new LSNutationModel( 0, 1, 2, 0,2,   7566.0,  -21.0,  -11.0,  -3250.0,   0.0,  -5.0),
13281           new LSNutationModel( 0, 0, 2, 2,1,  -6637.0,  -11.0,   25.0,   3353.0,   0.0,  14.0),
13282           new LSNutationModel( 0,-1, 2, 0,2,  -7141.0,   21.0,    8.0,   3070.0,   0.0,   4.0),
13283 
13284        /* 41-50 */
13285           new LSNutationModel( 0, 0, 0, 2,1,  -6302.0,  -11.0,    2.0,   3272.0,   0.0,   4.0),
13286           new LSNutationModel( 1, 0, 2,-2,1,   5800.0,   10.0,    2.0,  -3045.0,   0.0,  -1.0),
13287           new LSNutationModel( 2, 0, 2,-2,2,   6443.0,    0.0,   -7.0,  -2768.0,   0.0,  -4.0),
13288           new LSNutationModel(-2, 0, 0, 2,1,  -5774.0,  -11.0,  -15.0,   3041.0,   0.0,  -5.0),
13289           new LSNutationModel( 2, 0, 2, 0,1,  -5350.0,    0.0,   21.0,   2695.0,   0.0,  12.0),
13290           new LSNutationModel( 0,-1, 2,-2,1,  -4752.0,  -11.0,   -3.0,   2719.0,   0.0,  -3.0),
13291           new LSNutationModel( 0, 0, 0,-2,1,  -4940.0,  -11.0,  -21.0,   2720.0,   0.0,  -9.0),
13292           new LSNutationModel(-1,-1, 0, 2,0,   7350.0,    0.0,   -8.0,    -51.0,   0.0,   4.0),
13293           new LSNutationModel( 2, 0, 0,-2,1,   4065.0,    0.0,    6.0,  -2206.0,   0.0,   1.0),
13294           new LSNutationModel( 1, 0, 0, 2,0,   6579.0,    0.0,  -24.0,   -199.0,   0.0,   2.0),
13295 
13296        /* 51-60 */
13297           new LSNutationModel( 0, 1, 2,-2,1,   3579.0,    0.0,    5.0,  -1900.0,   0.0,   1.0),
13298           new LSNutationModel( 1,-1, 0, 0,0,   4725.0,    0.0,   -6.0,    -41.0,   0.0,   3.0),
13299           new LSNutationModel(-2, 0, 2, 0,2,  -3075.0,    0.0,   -2.0,   1313.0,   0.0,  -1.0),
13300           new LSNutationModel( 3, 0, 2, 0,2,  -2904.0,    0.0,   15.0,   1233.0,   0.0,   7.0),
13301           new LSNutationModel( 0,-1, 0, 2,0,   4348.0,    0.0,  -10.0,    -81.0,   0.0,   2.0),
13302           new LSNutationModel( 1,-1, 2, 0,2,  -2878.0,    0.0,    8.0,   1232.0,   0.0,   4.0),
13303           new LSNutationModel( 0, 0, 0, 1,0,  -4230.0,    0.0,    5.0,    -20.0,   0.0,  -2.0),
13304           new LSNutationModel(-1,-1, 2, 2,2,  -2819.0,    0.0,    7.0,   1207.0,   0.0,   3.0),
13305           new LSNutationModel(-1, 0, 2, 0,0,  -4056.0,    0.0,    5.0,     40.0,   0.0,  -2.0),
13306           new LSNutationModel( 0,-1, 2, 2,2,  -2647.0,    0.0,   11.0,   1129.0,   0.0,   5.0),
13307 
13308        /* 61-70 */
13309           new LSNutationModel(-2, 0, 0, 0,1,  -2294.0,    0.0,  -10.0,   1266.0,   0.0,  -4.0),
13310           new LSNutationModel( 1, 1, 2, 0,2,   2481.0,    0.0,   -7.0,  -1062.0,   0.0,  -3.0),
13311           new LSNutationModel( 2, 0, 0, 0,1,   2179.0,    0.0,   -2.0,  -1129.0,   0.0,  -2.0),
13312           new LSNutationModel(-1, 1, 0, 1,0,   3276.0,    0.0,    1.0,     -9.0,   0.0,   0.0),
13313           new LSNutationModel( 1, 1, 0, 0,0,  -3389.0,    0.0,    5.0,     35.0,   0.0,  -2.0),
13314           new LSNutationModel( 1, 0, 2, 0,0,   3339.0,    0.0,  -13.0,   -107.0,   0.0,   1.0),
13315           new LSNutationModel(-1, 0, 2,-2,1,  -1987.0,    0.0,   -6.0,   1073.0,   0.0,  -2.0),
13316           new LSNutationModel( 1, 0, 0, 0,2,  -1981.0,    0.0,    0.0,    854.0,   0.0,   0.0),
13317           new LSNutationModel(-1, 0, 0, 1,0,   4026.0,    0.0, -353.0,   -553.0,   0.0,-139.0),
13318           new LSNutationModel( 0, 0, 2, 1,2,   1660.0,    0.0,   -5.0,   -710.0,   0.0,  -2.0),
13319 
13320        /* 71-77 */
13321           new LSNutationModel(-1, 0, 2, 4,2,  -1521.0,    0.0,    9.0,    647.0,   0.0,   4.0),
13322           new LSNutationModel(-1, 1, 0, 1,1,   1314.0,    0.0,    0.0,   -700.0,   0.0,   0.0),
13323           new LSNutationModel( 0,-2, 2,-2,1,  -1283.0,    0.0,    0.0,    672.0,   0.0,   0.0),
13324           new LSNutationModel( 1, 0, 2, 2,1,  -1331.0,    0.0,    8.0,    663.0,   0.0,   4.0),
13325           new LSNutationModel(-2, 0, 2, 2,2,   1383.0,    0.0,   -2.0,   -594.0,   0.0,  -2.0),
13326           new LSNutationModel(-1, 0, 0, 0,2,   1405.0,    0.0,    4.0,   -610.0,   0.0,   2.0),
13327           new LSNutationModel( 1, 1, 2,-2,2,   1290.0,    0.0,    0.0,   -556.0,   0.0,   0.0)
13328        };
13329 
13330     /* Number of terms in the series */
13331        final int NLS = x.length;
13332 
13333     /*--------------------------------------------------------------------*/
13334 
13335     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13336        t = ((date1 - DJ00) + date2) / DJC;
13337 
13338     /* --------------------*/
13339     /* LUNI-SOLAR NUTATION */
13340     /* --------------------*/
13341 
13342     /* Fundamental (Delaunay) arguments from Simon et al. (1994) */
13343 
13344     /* Mean anomaly of the Moon. */
13345        el = fmod(485868.249036 + (1717915923.2178) * t, TURNAS) * DAS2R;
13346 
13347     /* Mean anomaly of the Sun. */
13348        elp = fmod(1287104.79305 + (129596581.0481) * t, TURNAS) * DAS2R;
13349 
13350     /* Mean argument of the latitude of the Moon. */
13351        f = fmod(335779.526232 + (1739527262.8478) * t, TURNAS) * DAS2R;
13352 
13353     /* Mean elongation of the Moon from the Sun. */
13354        d = fmod(1072260.70369 + (1602961601.2090) * t, TURNAS) * DAS2R;
13355 
13356     /* Mean longitude of the ascending node of the Moon. */
13357        om = fmod(450160.398036 + (-6962890.5431) * t, TURNAS) * DAS2R;
13358 
13359     /* Initialize the nutation values. */
13360        dp = 0.0;
13361        de = 0.0;
13362 
13363     /* Summation of luni-solar nutation series (smallest terms first). */
13364        for (i = NLS-1; i >= 0; i--) {
13365 
13366        /* Argument and functions. */
13367           arg = fmod( (double)x[i].nl  * el  +
13368                       (double)x[i].nlp * elp +
13369                       (double)x[i].nf  * f   +
13370                       (double)x[i].nd  * d   +
13371                       (double)x[i].nom * om, D2PI  );
13372           sarg = sin(arg);
13373           carg = cos(arg);
13374 
13375        /* Term. */
13376           dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg;
13377           de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg;
13378        }
13379 
13380     /* Convert from 0.1 microarcsec units to radians. */
13381        dpsils = dp * U2R;
13382        depsls = de * U2R;
13383 
13384     /* ------------------------------*/
13385     /* IN LIEU OF PLANETARY NUTATION */
13386     /* ------------------------------*/
13387 
13388     /* Fixed offset to correct for missing terms in truncated series. */
13389        dpsipl = DPPLAN;
13390        depspl = DEPLAN;
13391 
13392     /* --------*/
13393     /* RESULTS */
13394     /* --------*/
13395 
13396     /* Add luni-solar and planetary components. */
13397        return new NutationTerms(   dpsils + dpsipl,
13398                                 depsls + depspl);
13399 
13400     }
13401     
13402 
13403     /**
13404     *  IAU 2000A nutation with adjustments to match the IAU 2006
13405     *  precession.
13406     *
13407     *<!-- Given: -->
13408     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13409     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13410     *
13411     *<!-- Returned: -->
13412     *     @return  nutation, luni-solar + planetary (Note 2)
13413     *
13414     *<p>Status:  canonical model.
13415     *
13416     * <p>Notes:
13417     * <ol>
13418     *
13419     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13420     *     convenient way between the two arguments.  For example,
13421     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13422     *     among others:
13423     *<pre>
13424     *            date1          date2
13425     *
13426     *         2450123.7           0.0       (JD method)
13427     *         2451545.0       -1421.3       (J2000 method)
13428     *         2400000.5       50123.2       (MJD method)
13429     *         2450123.5           0.2       (date &amp; time method)
13430     *</pre>
13431     *     The JD method is the most natural and convenient to use in
13432     *     cases where the loss of several decimal digits of resolution
13433     *     is acceptable.  The J2000 method is best matched to the way
13434     *     the argument is handled internally and will deliver the
13435     *     optimum resolution.  The MJD method and the date &amp; time methods
13436     *     are both good compromises between resolution and convenience.
13437     *
13438     * <li> The nutation components in longitude and obliquity are in radians
13439     *     and with respect to the mean equinox and ecliptic of date,
13440     *     IAU 2006 precession model (Hilton et al. 2006, Capitaine et al.
13441     *     2005).
13442     *
13443     * <li> The function first computes the IAU 2000A nutation, then applies
13444     *     adjustments for (i) the consequences of the change in obliquity
13445     *     from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the
13446     *     secular variation in the Earth's dynamical flattening.
13447     *
13448     * <li> The present function provides classical nutation, complementing
13449     *     the IAU 2000 frame bias and IAU 2006 precession.  It delivers a
13450     *     pole which is at current epochs accurate to a few tens of
13451     *     microarcseconds, apart from the free core nutation.
13452     *</ol>
13453     *<p>Called:<ul>
13454     *     <li>{@link #jauNut00a} nutation, IAU 2000A
13455     * </ul>
13456     *<p>References:
13457     *
13458     *     <p>Chapront, J., Chapront-Touze, M. &amp; Francou, G. 2002,
13459     *     Astron.Astrophys. 387, 700
13460     *
13461     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
13462     *     Astron.Astrophys. 58, 1-16
13463     *
13464     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
13465     *     107, B4.  The MHB_2000 code itself was obtained on 9th September
13466     *     2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
13467     *
13468     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13469     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
13470     *
13471     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
13472     *     Astron.Astrophys.Supp.Ser. 135, 111
13473     *
13474     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
13475     *     Resolutions", in IERS Workshop 5.1 (2002)
13476     *
13477     *@version 2008 May 24
13478     *
13479     *  @since Release 20101201
13480     *
13481     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13482     */
13483     public static NutationTerms jauNut06a(double date1, double date2)
13484     {
13485        double t, fj2;
13486 
13487 
13488     /* Interval between fundamental date J2000.0 and given date (JC). */
13489        t = ((date1 - DJ00) + date2) / DJC;
13490 
13491     /* Factor correcting for secular variation of J2. */
13492        fj2 = -2.7774e-6 * t;
13493 
13494     /* Obtain IAU 2000A nutation. */
13495        NutationTerms nt = jauNut00a(date1, date2);
13496        
13497     /* Apply P03 adjustments (Wallace &amp; Capitaine, 2006, Eqs.5). */
13498        return new NutationTerms( nt.dpsi + nt.dpsi * (0.4697e-6 + fj2),
13499                                  nt.deps + nt.deps * fj2);
13500 
13501      }
13502     
13503     /**
13504     *  Nutation, IAU 1980 model.
13505     *
13506     *<p>This function is derived from the International Astronomical Union's
13507     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13508     *
13509     *<p>Status:  canonical model.
13510     *
13511     *<!-- Given: -->
13512     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13513     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13514     *
13515     *<!-- Returned: -->
13516     *     @return dpsi           double      <u>returned</u> nutation in longitude (radians)
13517     *             deps           double      <u>returned</u> nutation in obliquity (radians)
13518     *
13519     * <p>Notes:
13520     * <ol>
13521     *
13522     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13523     *     convenient way between the two arguments.  For example,
13524     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13525     *     among others:
13526     *<pre>
13527     *            date1          date2
13528     *
13529     *         2450123.7           0.0       (JD method)
13530     *         2451545.0       -1421.3       (J2000 method)
13531     *         2400000.5       50123.2       (MJD method)
13532     *         2450123.5           0.2       (date &amp; time method)
13533     *</pre>
13534     *     The JD method is the most natural and convenient to use in
13535     *     cases where the loss of several decimal digits of resolution
13536     *     is acceptable.  The J2000 method is best matched to the way
13537     *     the argument is handled internally and will deliver the
13538     *     optimum resolution.  The MJD method and the date &amp; time methods
13539     *     are both good compromises between resolution and convenience.
13540     *
13541     * <li> The nutation components are with respect to the ecliptic of
13542     *     date.
13543     *</ol>
13544     *<p>Called:<ul>
13545     *     <li>{@link #jauAnpm} normalize angle into range +/- pi
13546     * </ul>
13547     *<p>Reference:
13548     *
13549     *     <p>Explanatory Supplement to the Astronomical Almanac,
13550     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
13551     *     Section 3.222 (p111).
13552     *
13553     *@version 2008 September 30
13554     *
13555     *  @since Release 20101201
13556     *
13557     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13558     */
13559     public static NutationTerms jauNut80(double date1, double date2)
13560     {
13561        double t, el, elp, f, d, om, dp, de, arg, s, c;
13562        int j;
13563 
13564     /* Units of 0.1 milliarcsecond to radians */
13565        final double U2R = DAS2R / 1e4;
13566 
13567     /* ------------------------------------------------ */
13568     /* Table of multiples of arguments and coefficients */
13569     /* ------------------------------------------------ */
13570 
13571     /* The units for the sine and cosine coefficients are 0.1 mas and */
13572     /* the same per Julian century */
13573 
13574        final class NutationModel {
13575           final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13576           final double sp,spt;        /* longitude sine, 1 and t coefficients */
13577           final double ce,cet;        /* obliquity cosine, 1 and t coefficients */
13578           
13579           public NutationModel(int nl,int nlp,int nf,int nd,int nom,
13580           double sp,double spt,       
13581           double ce,double cet       ) {
13582                this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13583                this.sp = sp;this.spt = spt;      
13584                this.ce = ce;this.cet = cet;     
13585         }
13586        }
13587        NutationModel x[] = {
13588 
13589        /* 1-10 */
13590           new NutationModel(  0,  0,  0,  0,  1, -171996.0, -174.2,  92025.0,    8.9 ),
13591           new NutationModel(  0,  0,  0,  0,  2,    2062.0,    0.2,   -895.0,    0.5 ),
13592           new NutationModel( -2,  0,  2,  0,  1,      46.0,    0.0,    -24.0,    0.0 ),
13593           new NutationModel(  2,  0, -2,  0,  0,      11.0,    0.0,      0.0,    0.0 ),
13594           new NutationModel( -2,  0,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13595           new NutationModel(  1, -1,  0, -1,  0,      -3.0,    0.0,      0.0,    0.0 ),
13596           new NutationModel(  0, -2,  2, -2,  1,      -2.0,    0.0,      1.0,    0.0 ),
13597           new NutationModel(  2,  0, -2,  0,  1,       1.0,    0.0,      0.0,    0.0 ),
13598           new NutationModel(  0,  0,  2, -2,  2,  -13187.0,   -1.6,   5736.0,   -3.1 ),
13599           new NutationModel(  0,  1,  0,  0,  0,    1426.0,   -3.4,     54.0,   -0.1 ),
13600 
13601        /* 11-20 */
13602           new NutationModel(  0,  1,  2, -2,  2,    -517.0,    1.2,    224.0,   -0.6 ),
13603           new NutationModel(  0, -1,  2, -2,  2,     217.0,   -0.5,    -95.0,    0.3 ),
13604           new NutationModel(  0,  0,  2, -2,  1,     129.0,    0.1,    -70.0,    0.0 ),
13605           new NutationModel(  2,  0,  0, -2,  0,      48.0,    0.0,      1.0,    0.0 ),
13606           new NutationModel(  0,  0,  2, -2,  0,     -22.0,    0.0,      0.0,    0.0 ),
13607           new NutationModel(  0,  2,  0,  0,  0,      17.0,   -0.1,      0.0,    0.0 ),
13608           new NutationModel(  0,  1,  0,  0,  1,     -15.0,    0.0,      9.0,    0.0 ),
13609           new NutationModel(  0,  2,  2, -2,  2,     -16.0,    0.1,      7.0,    0.0 ),
13610           new NutationModel(  0, -1,  0,  0,  1,     -12.0,    0.0,      6.0,    0.0 ),
13611           new NutationModel( -2,  0,  0,  2,  1,      -6.0,    0.0,      3.0,    0.0 ),
13612 
13613        /* 21-30 */
13614           new NutationModel(  0, -1,  2, -2,  1,      -5.0,    0.0,      3.0,    0.0 ),
13615           new NutationModel(  2,  0,  0, -2,  1,       4.0,    0.0,     -2.0,    0.0 ),
13616           new NutationModel(  0,  1,  2, -2,  1,       4.0,    0.0,     -2.0,    0.0 ),
13617           new NutationModel(  1,  0,  0, -1,  0,      -4.0,    0.0,      0.0,    0.0 ),
13618           new NutationModel(  2,  1,  0, -2,  0,       1.0,    0.0,      0.0,    0.0 ),
13619           new NutationModel(  0,  0, -2,  2,  1,       1.0,    0.0,      0.0,    0.0 ),
13620           new NutationModel(  0,  1, -2,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13621           new NutationModel(  0,  1,  0,  0,  2,       1.0,    0.0,      0.0,    0.0 ),
13622           new NutationModel( -1,  0,  0,  1,  1,       1.0,    0.0,      0.0,    0.0 ),
13623           new NutationModel(  0,  1,  2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13624 
13625        /* 31-40 */
13626           new NutationModel(  0,  0,  2,  0,  2,   -2274.0,   -0.2,    977.0,   -0.5 ),
13627           new NutationModel(  1,  0,  0,  0,  0,     712.0,    0.1,     -7.0,    0.0 ),
13628           new NutationModel(  0,  0,  2,  0,  1,    -386.0,   -0.4,    200.0,    0.0 ),
13629           new NutationModel(  1,  0,  2,  0,  2,    -301.0,    0.0,    129.0,   -0.1 ),
13630           new NutationModel(  1,  0,  0, -2,  0,    -158.0,    0.0,     -1.0,    0.0 ),
13631           new NutationModel( -1,  0,  2,  0,  2,     123.0,    0.0,    -53.0,    0.0 ),
13632           new NutationModel(  0,  0,  0,  2,  0,      63.0,    0.0,     -2.0,    0.0 ),
13633           new NutationModel(  1,  0,  0,  0,  1,      63.0,    0.1,    -33.0,    0.0 ),
13634           new NutationModel( -1,  0,  0,  0,  1,     -58.0,   -0.1,     32.0,    0.0 ),
13635           new NutationModel( -1,  0,  2,  2,  2,     -59.0,    0.0,     26.0,    0.0 ),
13636 
13637        /* 41-50 */
13638           new NutationModel(  1,  0,  2,  0,  1,     -51.0,    0.0,     27.0,    0.0 ),
13639           new NutationModel(  0,  0,  2,  2,  2,     -38.0,    0.0,     16.0,    0.0 ),
13640           new NutationModel(  2,  0,  0,  0,  0,      29.0,    0.0,     -1.0,    0.0 ),
13641           new NutationModel(  1,  0,  2, -2,  2,      29.0,    0.0,    -12.0,    0.0 ),
13642           new NutationModel(  2,  0,  2,  0,  2,     -31.0,    0.0,     13.0,    0.0 ),
13643           new NutationModel(  0,  0,  2,  0,  0,      26.0,    0.0,     -1.0,    0.0 ),
13644           new NutationModel( -1,  0,  2,  0,  1,      21.0,    0.0,    -10.0,    0.0 ),
13645           new NutationModel( -1,  0,  0,  2,  1,      16.0,    0.0,     -8.0,    0.0 ),
13646           new NutationModel(  1,  0,  0, -2,  1,     -13.0,    0.0,      7.0,    0.0 ),
13647           new NutationModel( -1,  0,  2,  2,  1,     -10.0,    0.0,      5.0,    0.0 ),
13648 
13649        /* 51-60 */
13650           new NutationModel(  1,  1,  0, -2,  0,      -7.0,    0.0,      0.0,    0.0 ),
13651           new NutationModel(  0,  1,  2,  0,  2,       7.0,    0.0,     -3.0,    0.0 ),
13652           new NutationModel(  0, -1,  2,  0,  2,      -7.0,    0.0,      3.0,    0.0 ),
13653           new NutationModel(  1,  0,  2,  2,  2,      -8.0,    0.0,      3.0,    0.0 ),
13654           new NutationModel(  1,  0,  0,  2,  0,       6.0,    0.0,      0.0,    0.0 ),
13655           new NutationModel(  2,  0,  2, -2,  2,       6.0,    0.0,     -3.0,    0.0 ),
13656           new NutationModel(  0,  0,  0,  2,  1,      -6.0,    0.0,      3.0,    0.0 ),
13657           new NutationModel(  0,  0,  2,  2,  1,      -7.0,    0.0,      3.0,    0.0 ),
13658           new NutationModel(  1,  0,  2, -2,  1,       6.0,    0.0,     -3.0,    0.0 ),
13659           new NutationModel(  0,  0,  0, -2,  1,      -5.0,    0.0,      3.0,    0.0 ),
13660 
13661        /* 61-70 */
13662           new NutationModel(  1, -1,  0,  0,  0,       5.0,    0.0,      0.0,    0.0 ),
13663           new NutationModel(  2,  0,  2,  0,  1,      -5.0,    0.0,      3.0,    0.0 ),
13664           new NutationModel(  0,  1,  0, -2,  0,      -4.0,    0.0,      0.0,    0.0 ),
13665           new NutationModel(  1,  0, -2,  0,  0,       4.0,    0.0,      0.0,    0.0 ),
13666           new NutationModel(  0,  0,  0,  1,  0,      -4.0,    0.0,      0.0,    0.0 ),
13667           new NutationModel(  1,  1,  0,  0,  0,      -3.0,    0.0,      0.0,    0.0 ),
13668           new NutationModel(  1,  0,  2,  0,  0,       3.0,    0.0,      0.0,    0.0 ),
13669           new NutationModel(  1, -1,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13670           new NutationModel( -1, -1,  2,  2,  2,      -3.0,    0.0,      1.0,    0.0 ),
13671           new NutationModel( -2,  0,  0,  0,  1,      -2.0,    0.0,      1.0,    0.0 ),
13672 
13673        /* 71-80 */
13674           new NutationModel(  3,  0,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13675           new NutationModel(  0, -1,  2,  2,  2,      -3.0,    0.0,      1.0,    0.0 ),
13676           new NutationModel(  1,  1,  2,  0,  2,       2.0,    0.0,     -1.0,    0.0 ),
13677           new NutationModel( -1,  0,  2, -2,  1,      -2.0,    0.0,      1.0,    0.0 ),
13678           new NutationModel(  2,  0,  0,  0,  1,       2.0,    0.0,     -1.0,    0.0 ),
13679           new NutationModel(  1,  0,  0,  0,  2,      -2.0,    0.0,      1.0,    0.0 ),
13680           new NutationModel(  3,  0,  0,  0,  0,       2.0,    0.0,      0.0,    0.0 ),
13681           new NutationModel(  0,  0,  2,  1,  2,       2.0,    0.0,     -1.0,    0.0 ),
13682           new NutationModel( -1,  0,  0,  0,  2,       1.0,    0.0,     -1.0,    0.0 ),
13683           new NutationModel(  1,  0,  0, -4,  0,      -1.0,    0.0,      0.0,    0.0 ),
13684 
13685        /* 81-90 */
13686           new NutationModel( -2,  0,  2,  2,  2,       1.0,    0.0,     -1.0,    0.0 ),
13687           new NutationModel( -1,  0,  2,  4,  2,      -2.0,    0.0,      1.0,    0.0 ),
13688           new NutationModel(  2,  0,  0, -4,  0,      -1.0,    0.0,      0.0,    0.0 ),
13689           new NutationModel(  1,  1,  2, -2,  2,       1.0,    0.0,     -1.0,    0.0 ),
13690           new NutationModel(  1,  0,  2,  2,  1,      -1.0,    0.0,      1.0,    0.0 ),
13691           new NutationModel( -2,  0,  2,  4,  2,      -1.0,    0.0,      1.0,    0.0 ),
13692           new NutationModel( -1,  0,  4,  0,  2,       1.0,    0.0,      0.0,    0.0 ),
13693           new NutationModel(  1, -1,  0, -2,  0,       1.0,    0.0,      0.0,    0.0 ),
13694           new NutationModel(  2,  0,  2, -2,  1,       1.0,    0.0,     -1.0,    0.0 ),
13695           new NutationModel(  2,  0,  2,  2,  2,      -1.0,    0.0,      0.0,    0.0 ),
13696 
13697        /* 91-100 */
13698           new NutationModel(  1,  0,  0,  2,  1,      -1.0,    0.0,      0.0,    0.0 ),
13699           new NutationModel(  0,  0,  4, -2,  2,       1.0,    0.0,      0.0,    0.0 ),
13700           new NutationModel(  3,  0,  2, -2,  2,       1.0,    0.0,      0.0,    0.0 ),
13701           new NutationModel(  1,  0,  2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13702           new NutationModel(  0,  1,  2,  0,  1,       1.0,    0.0,      0.0,    0.0 ),
13703           new NutationModel( -1, -1,  0,  2,  1,       1.0,    0.0,      0.0,    0.0 ),
13704           new NutationModel(  0,  0, -2,  0,  1,      -1.0,    0.0,      0.0,    0.0 ),
13705           new NutationModel(  0,  0,  2, -1,  2,      -1.0,    0.0,      0.0,    0.0 ),
13706           new NutationModel(  0,  1,  0,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13707           new NutationModel(  1,  0, -2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13708 
13709        /* 101-106 */
13710           new NutationModel(  0, -1,  2,  0,  1,      -1.0,    0.0,      0.0,    0.0 ),
13711           new NutationModel(  1,  1,  0, -2,  1,      -1.0,    0.0,      0.0,    0.0 ),
13712           new NutationModel(  1,  0, -2,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13713           new NutationModel(  2,  0,  0,  2,  0,       1.0,    0.0,      0.0,    0.0 ),
13714           new NutationModel(  0,  0,  2,  4,  2,      -1.0,    0.0,      0.0,    0.0 ),
13715           new NutationModel(  0,  1,  0,  1,  0,       1.0,    0.0,      0.0,    0.0 )
13716        };
13717 
13718     /* Number of terms in the series */
13719        final int NT = x.length;
13720 
13721     /*--------------------------------------------------------------------*/
13722 
13723     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13724        t = ((date1 - DJ00) + date2) / DJC;
13725 
13726     /* --------------------- */
13727     /* Fundamental arguments */
13728     /* --------------------- */
13729 
13730     /* Mean longitude of Moon minus mean longitude of Moon's perigee. */
13731        el = jauAnpm(
13732             (485866.733 + (715922.633 + (31.310 + 0.064 * t) * t) * t)
13733             * DAS2R + fmod(1325.0 * t, 1.0) * D2PI);
13734 
13735     /* Mean longitude of Sun minus mean longitude of Sun's perigee. */
13736        elp = jauAnpm(
13737              (1287099.804 + (1292581.224 + (-0.577 - 0.012 * t) * t) * t)
13738              * DAS2R + fmod(99.0 * t, 1.0) * D2PI);
13739 
13740     /* Mean longitude of Moon minus mean longitude of Moon's node. */
13741        f = jauAnpm(
13742            (335778.877 + (295263.137 + (-13.257 + 0.011 * t) * t) * t)
13743            * DAS2R + fmod(1342.0 * t, 1.0) * D2PI);
13744 
13745     /* Mean elongation of Moon from Sun. */
13746        d = jauAnpm(
13747            (1072261.307 + (1105601.328 + (-6.891 + 0.019 * t) * t) * t)
13748            * DAS2R + fmod(1236.0 * t, 1.0) * D2PI);
13749 
13750     /* Longitude of the mean ascending node of the lunar orbit on the */
13751     /* ecliptic, measured from the mean equinox of date. */
13752        om = jauAnpm(
13753             (450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t)
13754             * DAS2R + fmod(-5.0 * t, 1.0) * D2PI);
13755 
13756     /* --------------- */
13757     /* Nutation series */
13758     /* --------------- */
13759 
13760     /* Initialize nutation components. */
13761        dp = 0.0;
13762        de = 0.0;
13763 
13764     /* Sum the nutation terms, ending with the biggest. */
13765        for (j = NT-1; j >= 0; j--) {
13766 
13767        /* Form argument for current term. */
13768           arg = (double)x[j].nl  * el
13769               + (double)x[j].nlp * elp
13770               + (double)x[j].nf  * f
13771               + (double)x[j].nd  * d
13772               + (double)x[j].nom * om;
13773 
13774        /* Accumulate current nutation term. */
13775           s = x[j].sp + x[j].spt * t;
13776           c = x[j].ce + x[j].cet * t;
13777           if (s != 0.0) dp += s * sin(arg);
13778           if (c != 0.0) de += c * cos(arg);
13779        }
13780 
13781     /* Convert results from 0.1 mas units to radians. */
13782        return new NutationTerms( dp * U2R,
13783                                  de * U2R);
13784 
13785         }
13786     
13787 
13788     /**
13789     *  Form the matrix of nutation for a given date, IAU 1980 model.
13790     *
13791     *<p>This function is derived from the International Astronomical Union's
13792     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13793     *
13794     *<p>Status:  support function.
13795     *
13796     *<!-- Given: -->
13797     *     @param date1 double           TDB date (Note 1)
13798     *     @param date2 double           TDB date (Note 1) 
13799     *
13800     *<!-- Returned: -->
13801     *     @return           double[3][3]       nutation matrix
13802     *
13803     * <p>Notes:
13804     * <ol>
13805     *
13806     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13807     *     convenient way between the two arguments.  For example,
13808     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13809     *     among others:
13810     *<pre>
13811     *            date1          date2
13812     *
13813     *         2450123.7           0.0       (JD method)
13814     *         2451545.0       -1421.3       (J2000 method)
13815     *         2400000.5       50123.2       (MJD method)
13816     *         2450123.5           0.2       (date &amp; time method)
13817     *</pre>
13818     *     The JD method is the most natural and convenient to use in
13819     *     cases where the loss of several decimal digits of resolution
13820     *     is acceptable.  The J2000 method is best matched to the way
13821     *     the argument is handled internally and will deliver the
13822     *     optimum resolution.  The MJD method and the date &amp; time methods
13823     *     are both good compromises between resolution and convenience.
13824     *
13825     * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
13826     *     where the p-vector V(true) is with respect to the true
13827     *     equatorial triad of date and the p-vector V(mean) is with
13828     *     respect to the mean equatorial triad of date.
13829     *</ol>
13830     *<p>Called:<ul>
13831     *     <li>{@link #jauNut80} nutation, IAU 1980
13832     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
13833     *     <li>{@link #jauNumat} form nutation matrix
13834     * </ul>
13835     *@version 2008 May 12
13836     *
13837     *  @since Release 20101201
13838     *
13839     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13840     */
13841     public static double[][] jauNutm80(double date1, double date2)
13842     {
13843         double rmatn[][];
13844     /* Nutation components and mean obliquity. */
13845        NutationTerms nt = jauNut80(date1, date2);
13846        double epsa = jauObl80(date1, date2);
13847 
13848     /* Build the rotation matrix. */
13849        rmatn = jauNumat(epsa, nt.dpsi, nt.deps);
13850 
13851        return rmatn;
13852 
13853         }
13854     
13855 
13856     /**
13857     *  Mean obliquity of the ecliptic, IAU 2006 precession model.
13858     *
13859     *<p>This function is derived from the International Astronomical Union's
13860     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13861     *
13862     *<p>Status:  canonical model.
13863     *
13864     *<!-- Given: -->
13865     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13866     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13867     *
13868     * <!-- Returned (function value): -->
13869     *  @return double   obliquity of the ecliptic (radians, Note 2)
13870     *
13871     * <p>Notes:
13872     * <ol>
13873     *
13874     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13875     *     convenient way between the two arguments.  For example,
13876     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13877     *     among others:
13878     *<pre>
13879     *            date1          date2
13880     *
13881     *         2450123.7           0.0       (JD method)
13882     *         2451545.0       -1421.3       (J2000 method)
13883     *         2400000.5       50123.2       (MJD method)
13884     *         2450123.5           0.2       (date &amp; time method)
13885     *</pre>
13886     *     The JD method is the most natural and convenient to use in
13887     *     cases where the loss of several decimal digits of resolution
13888     *     is acceptable.  The J2000 method is best matched to the way
13889     *     the argument is handled internally and will deliver the
13890     *     optimum resolution.  The MJD method and the date &amp; time methods
13891     *     are both good compromises between resolution and convenience.
13892     *
13893     * <li> The result is the angle between the ecliptic and mean equator of
13894     *     date date1+date2.
13895     *</ol>
13896     *<p>Reference:
13897     *
13898     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
13899     *
13900     *@version 2009 March 16
13901     *
13902     *  @since Release 20101201
13903     *
13904     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13905     */
13906     public static double jauObl06(double date1, double date2)
13907     {
13908        double t, eps0;
13909 
13910 
13911     /* Interval between fundamental date J2000.0 and given date (JC). */
13912        t = ((date1 - DJ00) + date2) / DJC;
13913 
13914     /* Mean obliquity. */
13915        eps0 = (84381.406     +
13916               (-46.836769    +
13917               ( -0.0001831   +
13918               (  0.00200340  +
13919               ( -0.000000576 +
13920               ( -0.0000000434) * t) * t) * t) * t) * t) * DAS2R;
13921 
13922        return eps0;
13923 
13924         }
13925     
13926 
13927     /**
13928     *  Mean obliquity of the ecliptic, IAU 1980 model.
13929     *
13930     *<p>This function is derived from the International Astronomical Union's
13931     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13932     *
13933     *<p>Status:  canonical model.
13934     *
13935     *<!-- Given: -->
13936     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13937     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13938     *
13939     * <!-- Returned (function value): -->
13940     *  @return double    obliquity of the ecliptic (radians, Note 2)
13941     *
13942     * <p>Notes:
13943     * <ol>
13944     *
13945     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13946     *     convenient way between the two arguments.  For example,
13947     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13948     *     among others:
13949     *<pre>
13950     *            date1          date2
13951     *
13952     *         2450123.7           0.0       (JD method)
13953     *         2451545.0       -1421.3       (J2000 method)
13954     *         2400000.5       50123.2       (MJD method)
13955     *         2450123.5           0.2       (date &amp; time method)
13956     *</pre>
13957     *     The JD method is the most natural and convenient to use in
13958     *     cases where the loss of several decimal digits of resolution
13959     *     is acceptable.  The J2000 method is best matched to the way
13960     *     the argument is handled internally and will deliver the
13961     *     optimum resolution.  The MJD method and the date &amp; time methods
13962     *     are both good compromises between resolution and convenience.
13963     *
13964     * <li> The result is the angle between the ecliptic and mean equator of
13965     *     date date1+date2.
13966     *</ol>
13967     *<p>Reference:
13968     *
13969     *     <p>Explanatory Supplement to the Astronomical Almanac,
13970     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
13971     *     Expression 3.222-1 (p114).
13972     *
13973     *@version 2009 March 16
13974     *
13975     *  @since Release 20101201
13976     *
13977     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13978     */
13979     public static double jauObl80(double date1, double date2)
13980     {
13981        double t, eps0;
13982 
13983 
13984     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13985        t = ((date1 - DJ00) + date2) / DJC;
13986 
13987     /* Mean obliquity of date. */
13988        eps0 = DAS2R * (84381.448  +
13989                       (-46.8150   +
13990                       (-0.00059   +
13991                       ( 0.001813) * t) * t) * t);
13992 
13993        return eps0;
13994 
13995         }
13996     
13997     
13998     /**
13999      * equinox based precession angles.
14000      *  .
14001      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14002      * @version $Revision$ $date$
14003      */
14004     public static class PrecessionAngles {
14005         /** epsilon_0   obliquity at J2000.0. */
14006         public double eps0; 
14007         /** psi_A       luni-solar precession. */
14008         public double psia;
14009         /** omega_A     inclination of equator wrt J2000.0 ecliptic. */
14010         public  double oma;
14011         /** P_A         ecliptic pole x, J2000.0 ecliptic triad. */
14012         public  double bpa;
14013         /** Q_A         ecliptic pole -y, J2000.0 ecliptic triad. */
14014         public double bqa;
14015         /** pi_A        angle between moving and J2000.0 ecliptics. */
14016         public  double pia;
14017         /** Pi_A        longitude of ascending node of the ecliptic. */
14018         public  double bpia;
14019         /** epsilon_A   obliquity of the ecliptic. */
14020         public double epsa;
14021         /** chi_A       planetary precession. */
14022         public  double chia;
14023         /** z_A         equatorial precession: -3rd 323 Euler angle. */
14024         public  double za;
14025         /** zeta_A      equatorial precession: -1st 323 Euler angle. */
14026         public  double zetaa;
14027         /** theta_A     equatorial precession: 2nd 323 Euler angle. */
14028         public double thetaa;
14029         /** p_A         general precession. */
14030         public  double pa;
14031         /** gamma_J2000 J2000.0 RA difference of ecliptic poles. */
14032         public  double gam;
14033         /** phi_J2000   J2000.0 codeclination of ecliptic pole. */
14034         public  double phi;
14035         /** psi_J2000   longitude difference of equator poles, J2000.0. */
14036         public  double psi;
14037 
14038         public PrecessionAngles ( double eps0, double psia, double oma, double bpa,
14039                  double bqa, double pia, double bpia,
14040                  double epsa, double chia, double za, double zetaa,
14041                  double thetaa, double pa,
14042                  double gam, double phi, double psi){
14043             
14044             this.eps0 = eps0;
14045             this.psia = psia;
14046             this.oma = oma;
14047             this.bpa = bpa;
14048             this.bqa = bqa;
14049             this.pia = pia;
14050             this.bpia = bpia;
14051             this.epsa = epsa;
14052             this.chia = chia;
14053             this.za = za;
14054             this.zetaa = zetaa;
14055             this.thetaa = thetaa;
14056             this.pa = pa;
14057             this.gam = gam;
14058             this.phi = phi;
14059             this.psi = psi;
14060         }
14061     }
14062     /**
14063     *  Precession angles, IAU 2006, equinox based.
14064     *
14065     *<p>This function is derived from the International Astronomical Union's
14066     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14067     *
14068     *<p>Status:  canonical models.
14069     *
14070     *<!-- Given: -->
14071     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14072     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14073     *
14074     *  Returned (see Note 2):
14075     *     eps0          double   epsilon_0
14076     *     psia          double   psi_A
14077     *     oma           double   omega_A
14078     *     bpa           double   P_A
14079     *     bqa           double   Q_A
14080     *     pia           double   pi_A
14081     *     bpia          double   Pi_A
14082     *     epsa          double   obliquity epsilon_A
14083     *     chia          double   chi_A
14084     *     za            double   z_A
14085     *     zetaa         double   zeta_A
14086     *     thetaa        double   theta_A
14087     *     pa            double   p_A
14088     *     gam           double   F-W angle gamma_J2000
14089     *     phi           double   F-W angle phi_J2000
14090     *     psi           double   F-W angle psi_J2000
14091     *
14092     * <p>Notes:
14093     * <ol>
14094     *
14095     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14096     *     convenient way between the two arguments.  For example,
14097     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14098     *     among others:
14099     *<pre>
14100     *            date1          date2
14101     *
14102     *         2450123.7           0.0       (JD method)
14103     *         2451545.0       -1421.3       (J2000 method)
14104     *         2400000.5       50123.2       (MJD method)
14105     *         2450123.5           0.2       (date &amp; time method)
14106     *</pre>
14107     *     The JD method is the most natural and convenient to use in
14108     *     cases where the loss of several decimal digits of resolution
14109     *     is acceptable.  The J2000 method is best matched to the way
14110     *     the argument is handled internally and will deliver the
14111     *     optimum resolution.  The MJD method and the date &amp; time methods
14112     *     are both good compromises between resolution and convenience.
14113     *
14114     * <li> This function returns the set of equinox based angles for the
14115     *     Capitaine et al. "P03" precession theory, adopted by the IAU in
14116     *     2006.  The angles are set out in Table 1 of Hilton et al. (2006):
14117     *
14118     *     eps0   epsilon_0   obliquity at J2000.0
14119     *     psia   psi_A       luni-solar precession
14120     *     oma    omega_A     inclination of equator wrt J2000.0 ecliptic
14121     *     bpa    P_A         ecliptic pole x, J2000.0 ecliptic triad
14122     *     bqa    Q_A         ecliptic pole -y, J2000.0 ecliptic triad
14123     *     pia    pi_A        angle between moving and J2000.0 ecliptics
14124     *     bpia   Pi_A        longitude of ascending node of the ecliptic
14125     *     epsa   epsilon_A   obliquity of the ecliptic
14126     *     chia   chi_A       planetary precession
14127     *     za     z_A         equatorial precession: -3rd 323 Euler angle
14128     *     zetaa  zeta_A      equatorial precession: -1st 323 Euler angle
14129     *     thetaa theta_A     equatorial precession: 2nd 323 Euler angle
14130     *     pa     p_A         general precession
14131     *     gam    gamma_J2000 J2000.0 RA difference of ecliptic poles
14132     *     phi    phi_J2000   J2000.0 codeclination of ecliptic pole
14133     *     psi    psi_J2000   longitude difference of equator poles, J2000.0
14134     *
14135     *     The returned values are all radians.
14136     *
14137     * <li> Hilton et al. (2006) Table 1 also contains angles that depend on
14138     *     models distinct from the P03 precession theory itself, namely the
14139     *     IAU 2000A frame bias and nutation.  The quoted polynomials are
14140     *     used in other JSOFA functions:
14141     *
14142     *     . jauXy06  contains the polynomial parts of the X and Y series.
14143     *
14144     *     . jauS06  contains the polynomial part of the s+XY/2 series.
14145     *
14146     *     . jauPfw06  implements the series for the Fukushima-Williams
14147     *       angles that are with respect to the GCRS pole (i.e. the variants
14148     *       that include frame bias).
14149     *
14150     * <li> The IAU resolution stipulated that the choice of parameterization
14151     *     was left to the user, and so an IAU compliant precession
14152     *     implementation can be constructed using various combinations of
14153     *     the angles returned by the present function.
14154     *
14155     * <li> The parameterization used by JSOFA is the Fukushima-Williams angles
14156     *     referred directly to the GCRS pole.  These are the final four
14157     *     arguments returned by the present function, but are more
14158     *     efficiently calculated by calling the function jauPfw06.   JSOFA
14159     *     also supports the direct computation of the CIP GCRS X,Y by
14160     *     series, available by calling jauXy06.
14161     *
14162     * <li> The agreement between the different parameterizations is at the
14163     *     1 microarcsecond level in the present era.
14164     *
14165     * <li> When constructing a precession formulation that refers to the GCRS
14166     *     pole rather than the dynamical pole, it may (depending on the
14167     *     choice of angles) be necessary to introduce the frame bias
14168     *     explicitly.
14169     *
14170     * <li> It is permissible to re-use the same variable in the returned
14171     *     arguments.  The quantities are stored in the stated order.
14172     *</ol>
14173     *<p>Reference:
14174     *
14175     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14176     *
14177     *<p>Called:<ul>
14178     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
14179     * </ul>
14180     *@version 2009 December 17
14181     *
14182     *  @since Release 20101201
14183     *
14184     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14185     */
14186     public static PrecessionAngles jauP06e(double date1, double date2)
14187     {
14188        double t;
14189        double eps0,  psia,  oma,  bpa,
14190         bqa,  pia,  bpia,
14191         epsa,  chia,  za,  zetaa,
14192         thetaa,  pa,
14193         gam,  phi,  psi;
14194 
14195     /* Interval between fundamental date J2000.0 and given date (JC). */
14196        t = ((date1 - DJ00) + date2) / DJC;
14197 
14198     /* Obliquity at J2000.0. */
14199 
14200        eps0 = 84381.406 * DAS2R;
14201 
14202     /* Luni-solar precession. */
14203 
14204        psia = ( 5038.481507     +
14205                (   -1.0790069    +
14206                (   -0.00114045   +
14207                (    0.000132851  +
14208                (   -0.0000000951 )
14209                * t) * t) * t) * t) * t * DAS2R;
14210 
14211     /* Inclination of mean equator with respect to the J2000.0 ecliptic. */
14212 
14213        oma = eps0 + ( -0.025754     +
14214                       (  0.0512623    +
14215                       ( -0.00772503   +
14216                       ( -0.000000467  +
14217                       (  0.0000003337 )
14218                       * t) * t) * t) * t) * t * DAS2R;
14219 
14220     /* Ecliptic pole x, J2000.0 ecliptic triad. */
14221 
14222        bpa = (  4.199094     +
14223               (  0.1939873    +
14224               ( -0.00022466   +
14225               ( -0.000000912  +
14226               (  0.0000000120 )
14227               * t) * t) * t) * t) * t * DAS2R;
14228 
14229     /* Ecliptic pole -y, J2000.0 ecliptic triad. */
14230 
14231        bqa = ( -46.811015     +
14232               (   0.0510283    +
14233               (   0.00052413   +
14234               (  -0.000000646  +
14235               (  -0.0000000172 )
14236               * t) * t) * t) * t) * t * DAS2R;
14237 
14238     /* Angle between moving and J2000.0 ecliptics. */
14239 
14240        pia = ( 46.998973     +
14241               ( -0.0334926    +
14242               ( -0.00012559   +
14243               (  0.000000113  +
14244               ( -0.0000000022 )
14245               * t) * t) * t) * t) * t * DAS2R;
14246 
14247     /* Longitude of ascending node of the moving ecliptic. */
14248 
14249        bpia = ( 629546.7936      +
14250                (   -867.95758     +
14251                (      0.157992    +
14252                (     -0.0005371   +
14253                (     -0.00004797  +
14254                (      0.000000072 )
14255                * t) * t) * t) * t) * t) * DAS2R;
14256 
14257     /* Mean obliquity of the ecliptic. */
14258 
14259        epsa = jauObl06(date1, date2);
14260 
14261     /* Planetary precession. */
14262 
14263        chia = ( 10.556403     +
14264                ( -2.3814292    +
14265                ( -0.00121197   +
14266                (  0.000170663  +
14267                ( -0.0000000560 )
14268                * t) * t) * t) * t) * t * DAS2R;
14269 
14270     /* Equatorial precession: minus the third of the 323 Euler angles. */
14271 
14272        za = (   -2.650545     +
14273              ( 2306.077181     +
14274              (    1.0927348    +
14275              (    0.01826837   +
14276              (   -0.000028596  +
14277              (   -0.0000002904 )
14278              * t) * t) * t) * t) * t) * DAS2R;
14279 
14280     /* Equatorial precession: minus the first of the 323 Euler angles. */
14281 
14282        zetaa = (    2.650545     +
14283                 ( 2306.083227     +
14284                 (    0.2988499    +
14285                 (    0.01801828   +
14286                 (   -0.000005971  +
14287                 (   -0.0000003173 )
14288                 * t) * t) * t) * t) * t) * DAS2R;
14289 
14290     /* Equatorial precession: second of the 323 Euler angles. */
14291 
14292        thetaa = ( 2004.191903     +
14293                  (   -0.4294934    +
14294                  (   -0.04182264   +
14295                  (   -0.000007089  +
14296                  (   -0.0000001274 )
14297                  * t) * t) * t) * t) * t * DAS2R;
14298 
14299     /* General precession. */
14300 
14301        pa = ( 5028.796195     +
14302              (    1.1054348    +
14303              (    0.00007964   +
14304              (   -0.000023857  +
14305              (    0.0000000383 )
14306              * t) * t) * t) * t) * t * DAS2R;
14307 
14308     /* Fukushima-Williams angles for precession. */
14309 
14310        gam = ( 10.556403     +
14311               (  0.4932044    +
14312               ( -0.00031238   +
14313               ( -0.000002788  +
14314               (  0.0000000260 )
14315               * t) * t) * t) * t) * t * DAS2R;
14316 
14317        phi = eps0 + ( -46.811015     +
14318                       (   0.0511269    +
14319                       (   0.00053289   +
14320                       (  -0.000000440  +
14321                       (  -0.0000000176 )
14322                       * t) * t) * t) * t) * t * DAS2R;
14323 
14324        psi = ( 5038.481507     +
14325               (    1.5584176    +
14326               (   -0.00018522   +
14327               (   -0.000026452  +
14328               (   -0.0000000148 )
14329               * t) * t) * t) * t) * t * DAS2R;
14330 
14331        return new PrecessionAngles(eps0, psia, oma, bpa, bqa, pia, bpia, epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi);
14332 
14333         }
14334     
14335 
14336     /**
14337     *  Extend a p-vector to a pv-vector by appending a zero velocity.
14338     *
14339     *<p>This function is derived from the International Astronomical Union's
14340     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14341     *
14342     *<p>Status:  vector/matrix support function.
14343     *
14344     *<!-- Given: -->
14345     *     @param p         double[3]        p-vector
14346     *
14347     *<!-- Returned: -->
14348     *     @return pv        double[2][3]      <u>returned</u> pv-vector
14349     *
14350     *<p>Called:<ul>
14351     *     <li>{@link #jauCp} copy p-vector
14352     *     <li>{@link #jauZp} zero p-vector
14353     * </ul>
14354     *@version 2008 May 11
14355     *
14356     *  @since Release 20101201
14357     *
14358     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14359     */
14360     public static double[][] jauP2pv(double p[] )
14361     {
14362         double pv[][] = new double[3][3];
14363         jauCp(p, pv[0]);
14364         jauZp(pv[1]);
14365 
14366         return pv;
14367 
14368         }
14369     
14370     /**
14371      * A position expressed in spherical polar coordinates.
14372      *  .
14373      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14374      * @version $Revision$ $date$
14375      */
14376     public static class SphericalPosition {
14377         /** longitude angle (radians) */
14378         public double theta;
14379         /** latitude angle (radians) */
14380         public double phi;
14381         /** radial distance */
14382         public double r;
14383         public SphericalPosition(double theta, double phi, double r) {
14384            this.theta = theta;
14385            this.phi = phi;
14386            this.r = r;
14387         }
14388     }
14389     
14390     /**
14391     *  P-vector to spherical polar coordinates.
14392     *
14393     *<p>This function is derived from the International Astronomical Union's
14394     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14395     *
14396     *<p>Status:  vector/matrix support function.
14397     *
14398     *<!-- Given: -->
14399     *     @param p         double[3]     p-vector
14400     *
14401     *<!-- Returned: -->
14402     *     @return theta     double         <u>returned</u> longitude angle (radians)
14403     *             phi       double         <u>returned</u> latitude angle (radians)
14404     *             r         double         <u>returned</u> radial distance
14405     *
14406     * <p>Notes:
14407     * <ol>
14408     *
14409     * <li> If P is null, zero theta, phi and r are returned.
14410     *
14411     * <li> At either pole, zero theta is returned.
14412     *</ol>
14413     *<p>Called:<ul>
14414     *     <li>{@link #jauC2s} p-vector to spherical
14415     *     <li>{@link #jauPm} modulus of p-vector
14416     * </ul>
14417     *@version 2008 May 22
14418     *
14419     *  @since Release 20101201
14420     *
14421     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14422     */
14423     public static SphericalPosition jauP2s(double p[])
14424     {
14425        SphericalCoordinate sc = jauC2s(p);
14426        double r = jauPm(p);
14427 
14428        return new SphericalPosition(sc.alpha, sc.delta, r);
14429 
14430         }
14431     
14432 
14433     /**
14434     *  Position-angle from two p-vectors.
14435     *
14436     *<p>This function is derived from the International Astronomical Union's
14437     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14438     *
14439     *<p>Status:  vector/matrix support function.
14440     *
14441     *<!-- Given: -->
14442     *     @param a       double[3]   direction of reference point
14443     *     @param b       double[3]   direction of point whose PA is required
14444     *
14445     * <!-- Returned (function value): -->
14446     *  @return double     position angle of b with respect to a (radians)
14447     *
14448     * <p>Notes:
14449     * <ol>
14450     *
14451     * <li> The result is the position angle, in radians, of direction b with
14452     *     respect to direction a.  It is in the range -pi to +pi.  The
14453     *     sense is such that if b is a small distance "north" of a the
14454     *     position angle is approximately zero, and if b is a small
14455     *     distance "east" of a the position angle is approximately +pi/2.
14456     *
14457     * <li> The vectors a and b need not be of unit length.
14458     *
14459     * <li> Zero is returned if the two directions are the same or if either
14460     *     vector is null.
14461     *
14462     * <li> If vector a is at a pole, the result is ill-defined.
14463     *</ol>
14464     *<p>Called:<ul>
14465     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
14466     *     <li>{@link #jauPm} modulus of p-vector
14467     *     <li>{@link #jauPxp} vector product of two p-vectors
14468     *     <li>{@link #jauPmp} p-vector minus p-vector
14469     *     <li>{@link #jauPdp} scalar product of two p-vectors
14470     * </ul>
14471     *@version 2008 May 25
14472     *
14473     *  @since Release 20101201
14474     *
14475     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14476     */
14477     public static double jauPap(double a[] , double b[] )
14478     {
14479        double am, au[] = new double[3], bm, st, ct, xa, ya, za, eta[] = new double[3], xi[] = new double[3], a2b[] = new double[3], pa;
14480 
14481 
14482     /* Modulus and direction of the a vector. */
14483        NormalizedVector nv = jauPn(a );
14484        am = nv.r; au = nv.u;
14485     /* Modulus of the b vector. */
14486        bm = jauPm(b);
14487 
14488     /* Deal with the case of a null vector. */
14489        if ((am == 0.0) || (bm == 0.0)) {
14490           st = 0.0;
14491           ct = 1.0;
14492        } else {
14493 
14494        /* The "north" axis tangential from a (arbitrary length). */
14495           xa = a[0];
14496           ya = a[1];
14497           za = a[2];
14498           eta[0] = -xa * za;
14499           eta[1] = -ya * za;
14500           eta[2] =  xa*xa + ya*ya;
14501 
14502        /* The "east" axis tangential from a (same length). */
14503           xi = jauPxp(eta,au);
14504 
14505        /* The vector from a to b. */
14506           a2b = jauPmp(b, a);
14507 
14508        /* Resolve into components along the north and east axes. */
14509           st = jauPdp(a2b, xi);
14510           ct = jauPdp(a2b, eta);
14511 
14512        /* Deal with degenerate cases. */
14513           if ((st == 0.0) && (ct == 0.0)) ct = 1.0;
14514        }
14515 
14516     /* Position angle. */
14517        pa = atan2(st, ct);
14518 
14519        return pa;
14520 
14521         }
14522     
14523 
14524     /**
14525     *  Position-angle from spherical coordinates.
14526     *
14527     *<p>This function is derived from the International Astronomical Union's
14528     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14529     *
14530     *<p>Status:  vector/matrix support function.
14531     *
14532     *<!-- Given: -->
14533     *     @param al      double      longitude of point A (e.g. RA) in radians
14534     *     @param ap      double      latitude of point A (e.g. Dec) in radians
14535     *     @param bl      double      longitude of point B
14536     *     @param bp      double      latitude of point B
14537     *
14538     * <!-- Returned (function value): -->
14539     *  @return double     position angle of B with respect to A
14540     *
14541     * <p>Notes:
14542     * <ol>
14543     *
14544     * <li> The result is the bearing (position angle), in radians, of point
14545     *     B with respect to point A.  It is in the range -pi to +pi.  The
14546     *     sense is such that if B is a small distance "east" of point A,
14547     *     the bearing is approximately +pi/2.
14548     *
14549     * <li> Zero is returned if the two points are coincident.
14550     *</ol>
14551     *@version 2008 May 22
14552     *
14553     *  @since Release 20101201
14554     *
14555     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14556     */
14557     public static double jauPas(double al, double ap, double bl, double bp)
14558     {
14559        double dl, x, y, pa;
14560 
14561 
14562        dl = bl - al;
14563        y = sin(dl) * cos(bp);
14564        x = sin(bp) * cos(ap) - cos(bp) * sin(ap) * cos(dl);
14565        pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0;
14566 
14567        return pa;
14568 
14569         }
14570     
14571 
14572     /**
14573     *  This function forms three Euler angles which implement general
14574     *  precession from epoch J2000.0, using the IAU 2006 model.  Frame
14575     *  bias (the offset between ICRS and mean J2000.0) is included.
14576     *
14577     *<p>This function is derived from the International Astronomical Union's
14578     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14579     *
14580     *<p>Status:  support function.
14581     *
14582     *<!-- Given: -->
14583     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14584     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14585     *
14586     *<!-- Returned: -->
14587     *     @return bzeta          1st rotation: radians cw around z,
14588     *                            3rd rotation: radians cw around z,
14589     *                            2nd rotation: radians ccw around y.
14590     *
14591     * <p>Notes:
14592     * <ol>
14593     *
14594     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14595     *     convenient way between the two arguments.  For example,
14596     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14597     *     among others:
14598     *<pre>
14599     *            date1          date2
14600     *
14601     *         2450123.7           0.0       (JD method)
14602     *         2451545.0       -1421.3       (J2000 method)
14603     *         2400000.5       50123.2       (MJD method)
14604     *         2450123.5           0.2       (date &amp; time method)
14605     *</pre>
14606     *     The JD method is the most natural and convenient to use in
14607     *     cases where the loss of several decimal digits of resolution
14608     *     is acceptable.  The J2000 method is best matched to the way
14609     *     the argument is handled internally and will deliver the
14610     *     optimum resolution.  The MJD method and the date &amp; time methods
14611     *     are both good compromises between resolution and convenience.
14612     *
14613     * <li> The traditional accumulated precession angles zeta_A, z_A,
14614     *     theta_A cannot be obtained in the usual way, namely through
14615     *     polynomial expressions, because of the frame bias.  The latter
14616     *     means that two of the angles undergo rapid changes near this
14617     *     date.  They are instead the results of decomposing the
14618     *     precession-bias matrix obtained by using the Fukushima-Williams
14619     *     method, which does not suffer from the problem.  The
14620     *     decomposition returns values which can be used in the
14621     *     conventional formulation and which include frame bias.
14622     *
14623     * <li> The three angles are returned in the conventional order, which
14624     *     is not the same as the order of the corresponding Euler
14625     *     rotations.  The precession-bias matrix is
14626     *     R_3(-z) x R_2(+theta) x R_3(-zeta).
14627     *
14628     * <li> Should zeta_A, z_A, theta_A angles be required that do not
14629     *     contain frame bias, they are available by calling the JSOFA
14630     *     function jauP06e.
14631     *</ol>
14632     *<p>Called:<ul>
14633     *     <li>{@link #jauPmat06} PB matrix, IAU 2006
14634     *     <li>{@link #jauRz} rotate around Z-axis
14635     * </ul>
14636     *@version 2008 May 26
14637     *
14638     *  @since Release 20101201
14639     *
14640     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14641     */
14642     public static EulerAngles jauPb06(double date1, double date2)
14643     {
14644        double r[][] = new double[3][3], r31, r32;
14645 
14646 
14647     /* Precession matrix via Fukushima-Williams angles. */
14648        r = jauPmat06(date1, date2);
14649 
14650     /* Solve for z. */
14651        double bz = atan2(r[1][2], r[0][2]);
14652 
14653     /* Remove it from the matrix. */
14654        jauRz(bz, r);
14655 
14656     /* Solve for the remaining two angles. */
14657        double bzeta = atan2 (r[1][0], r[1][1]);
14658        r31 = r[2][0];
14659        r32 = r[2][1];
14660        double btheta = atan2(-dsign(sqrt(r31 * r31 + r32 * r32), r[0][2]),
14661                        r[2][2]);
14662 
14663        return new EulerAngles(bzeta, bz, btheta);
14664 
14665         }
14666     
14667 
14668     /**
14669     *  p-vector inner (=scalar=dot) product.
14670     *
14671     *<p>This function is derived from the International Astronomical Union's
14672     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14673     *
14674     *<p>Status:  vector/matrix support function.
14675     *
14676     *<!-- Given: -->
14677     *     @param a       double[3]      first p-vector
14678     *     @param b       double[3]      second p-vector
14679     *
14680     * <!-- Returned (function value): -->
14681     *  @return double        a . b
14682     *
14683     *@version 2008 May 22
14684     *
14685     *  @since Release 20101201
14686     *
14687     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14688     */
14689     public static double jauPdp(double a[] , double b[] )
14690     {
14691        double w;
14692 
14693 
14694        w  = a[0] * b[0]
14695           + a[1] * b[1]
14696           + a[2] * b[2];
14697 
14698        return w;
14699 
14700         }
14701     
14702 
14703     /**
14704      * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14705      * 
14706      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
14707      * 
14708      * @since AIDA Stage 1
14709      */
14710     public static class FWPrecessionAngles{
14711         /** F-W angle gamma_bar (radians) */
14712         public double gamb;
14713         /** F-W angle phi_bar (radians) */
14714         public double phib;
14715         /** F-W angle psi_bar (radians) */
14716         public double psib;
14717         /** F-W angle epsilon_A (radians) */
14718         public double epsa;
14719         public FWPrecessionAngles(double gamb, double phib, double psib, double epsa) {
14720             this.gamb = gamb;
14721             this.phib = phib;
14722             this.psib = psib;
14723             this.epsa = epsa;
14724         }
14725     }
14726     /**
14727     *  Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14728     *
14729     *<p>This function is derived from the International Astronomical Union's
14730     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14731     *
14732     *<p>Status:  canonical model.
14733     *
14734     *<!-- Given: -->
14735     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14736     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14737     *
14738     *<!-- Returned: -->
14739     *     @return gamb          double     <u>returned</u> F-W angle gamma_bar (radians)
14740     *             phib          double     <u>returned</u> F-W angle phi_bar (radians)
14741     *             psib          double     <u>returned</u> F-W angle psi_bar (radians)
14742     *             epsa          double     <u>returned</u> F-W angle epsilon_A (radians)
14743     *
14744     * <p>Notes:
14745     * <ol>
14746     *
14747     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14748     *     convenient way between the two arguments.  For example,
14749     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14750     *     among others:
14751     *<pre>
14752     *            date1          date2
14753     *
14754     *         2450123.7           0.0       (JD method)
14755     *         2451545.0       -1421.3       (J2000 method)
14756     *         2400000.5       50123.2       (MJD method)
14757     *         2450123.5           0.2       (date &amp; time method)
14758     *</pre>
14759     *     The JD method is the most natural and convenient to use in
14760     *     cases where the loss of several decimal digits of resolution
14761     *     is acceptable.  The J2000 method is best matched to the way
14762     *     the argument is handled internally and will deliver the
14763     *     optimum resolution.  The MJD method and the date &amp; time methods
14764     *     are both good compromises between resolution and convenience.
14765     *
14766     * <li> Naming the following points:
14767     *
14768     *           e = J2000.0 ecliptic pole,
14769     *           p = GCRS pole,
14770     *           E = mean ecliptic pole of date,
14771     *     and   P = mean pole of date,
14772     *
14773     *     the four Fukushima-Williams angles are as follows:
14774     *
14775     *        gamb = gamma_bar = epE
14776     *        phib = phi_bar = pE
14777     *        psib = psi_bar = pEP
14778     *        epsa = epsilon_A = EP
14779     *
14780     * <li> The matrix representing the combined effects of frame bias and
14781     *     precession is:
14782     *
14783     *        PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
14784     *
14785     * <li> The matrix representing the combined effects of frame bias,
14786     *     precession and nutation is simply:
14787     *
14788     *        NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
14789     *
14790     *     where dP and dE are the nutation components with respect to the
14791     *     ecliptic of date.
14792     *</ol>
14793     *<p>Reference:
14794     *
14795     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14796     *
14797     *<p>Called:<ul>
14798     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
14799     * </ul>
14800     *@version 2009 December 17
14801     *
14802     *  @since Release 20101201
14803     *
14804     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14805     */
14806     public static FWPrecessionAngles jauPfw06(double date1, double date2 )
14807     {
14808        double t;
14809 
14810 
14811     /* Interval between fundamental date J2000.0 and given date (JC). */
14812        t = ((date1 - DJ00) + date2) / DJC;
14813 
14814     /* P03 bias+precession angles. */
14815        double gamb = (    -0.052928     +
14816                (    10.556378     +
14817                (     0.4932044    +
14818                (    -0.00031238   +
14819                (    -0.000002788  +
14820                (     0.0000000260 )
14821                * t) * t) * t) * t) * t) * DAS2R;
14822        double phib = ( 84381.412819     +
14823                (   -46.811016     +
14824                (     0.0511268    +
14825                (     0.00053289   +
14826                (    -0.000000440  +
14827                (    -0.0000000176 )
14828                * t) * t) * t) * t) * t) * DAS2R;
14829        double psib = (    -0.041775     +
14830                (  5038.481484     +
14831                (     1.5584175    +
14832                (    -0.00018522   +
14833                (    -0.000026452  +
14834                (    -0.0000000148 )
14835                * t) * t) * t) * t) * t) * DAS2R;
14836        double epsa =  jauObl06(date1, date2);
14837 
14838        return new FWPrecessionAngles(gamb, phib, psib, epsa);
14839 
14840         }
14841     
14842 
14843     /**
14844     *<p>This function is derived from the International Astronomical Union's
14845     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14846     *
14847     *<p>Status:  support function.
14848     *
14849     *  Approximate heliocentric position and velocity of a nominated major
14850     *  planet:  Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or
14851     *  Neptune (but not the Earth itself).
14852     *
14853     *<!-- Given: -->
14854     *     @param date1   double        TDB date part A (Note 1)
14855     *     @param date2   double        TDB date part B (Note 1)
14856     *     @param np      int           planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars,
14857     *                                  5=Jupiter,  6=Saturn,  7=Uranus, 8=Neptune)
14858     *
14859     *  Returned (argument):
14860     *     @param  pv     double[2][3] (returned) planet p,v (heliocentric, J2000.0, au,au/d)
14861     *
14862     * <!-- Returned (function value): -->
14863     *  @return int          status: -1 = illegal NP (outside 1-8)
14864     *                                  0 = OK
14865     *                                 +1 = warning: year outside 1000-3000
14866     *                                 +2 = warning: failed to converge
14867     *
14868     * <p>Notes:
14869     * <ol>
14870     *
14871     * <li> The date date1+date2 is in the TDB time scale (in practice TT can
14872     *     be used) and is a Julian Date, apportioned in any convenient way
14873     *     between the two arguments.  For example, JD(TDB)=2450123.7 could
14874     *     be expressed in any of these ways, among others:
14875     *<pre>
14876     *            date1          date2
14877     *
14878     *         2450123.7           0.0       (JD method)
14879     *         2451545.0       -1421.3       (J2000 method)
14880     *         2400000.5       50123.2       (MJD method)
14881     *         2450123.5           0.2       (date &amp; time method)
14882     *</pre>
14883     *     The JD method is the most natural and convenient to use in cases
14884     *     where the loss of several decimal digits of resolution is
14885     *     acceptable.  The J2000 method is best matched to the way the
14886     *     argument is handled internally and will deliver the optimum
14887     *     resolution.  The MJD method and the date &amp; time methods are both
14888     *     good compromises between resolution and convenience.  The limited
14889     *     accuracy of the present algorithm is such that any of the methods
14890     *     is satisfactory.
14891     *
14892     * <li> If an np value outside the range 1-8 is supplied, an error status
14893     *     (function value -1) is returned and the pv vector set to zeroes.
14894     *
14895     * <li> For np=3 the result is for the Earth-Moon Barycenter.  To obtain
14896     *     the heliocentric position and velocity of the Earth, use instead
14897     *     the JSOFA function jauEpv00.
14898     *
14899     * <li> On successful return, the array pv contains the following:
14900     *<pre>
14901     *        pv[0][0]   x      }
14902     *        pv[0][1]   y      } heliocentric position, au
14903     *        pv[0][2]   z      }
14904     *
14905     *        pv[1][0]   xdot   }
14906     *        pv[1][1]   ydot   } heliocentric velocity, au/d
14907     *        pv[1][2]   zdot   }
14908     *</pre>
14909     *     The reference frame is equatorial and is with respect to the
14910     *     mean equator and equinox of epoch J2000.0.
14911     *
14912     * <li> The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront,
14913     *     M. Chapront-Touze, G. Francou and J. Laskar (Bureau des
14914     *     Longitudes, Paris, France).  From comparisons with JPL
14915     *     ephemeris DE102, they quote the following maximum errors
14916     *     over the interval 1800-2050:
14917     *<pre>
14918     *                     L (arcsec)    B (arcsec)      R (km)
14919     *
14920     *        Mercury          4             1             300
14921     *        Venus            5             1             800
14922     *        EMB              6             1            1000
14923     *        Mars            17             1            7700
14924     *        Jupiter         71             5           76000
14925     *        Saturn          81            13          267000
14926     *        Uranus          86             7          712000
14927     *        Neptune         11             1          253000
14928     *</pre>
14929     *     Over the interval 1000-3000, they report that the accuracy is no
14930     *     worse than 1.5 times that over 1800-2050.  Outside 1000-3000 the
14931     *     accuracy declines.
14932     *
14933     *     Comparisons of the present function with the JPL DE200 ephemeris
14934     *     give the following RMS errors over the interval 1960-2025:
14935     *<pre>
14936     *                      position (km)     velocity (m/s)
14937     *
14938     *        Mercury            334               0.437
14939     *        Venus             1060               0.855
14940     *        EMB               2010               0.815
14941     *        Mars              7690               1.98
14942     *        Jupiter          71700               7.70
14943     *        Saturn          199000              19.4
14944     *        Uranus          564000              16.4
14945     *        Neptune         158000              14.4
14946     *</pre>
14947     *     Comparisons against DE200 over the interval 1800-2100 gave the
14948     *     following maximum absolute differences.  (The results using
14949     *     DE406 were essentially the same.)
14950     *<pre>
14951     *                   L (arcsec)   B (arcsec)     R (km)   Rdot (m/s)
14952     *
14953     *        Mercury        7            1            500       0.7
14954     *        Venus          7            1           1100       0.9
14955     *        EMB            9            1           1300       1.0
14956     *        Mars          26            1           9000       2.5
14957     *        Jupiter       78            6          82000       8.2
14958     *        Saturn        87           14         263000      24.6
14959     *        Uranus        86            7         661000      27.4
14960     *        Neptune       11            2         248000      21.4
14961     *</pre>
14962     * <li> The present JSOFA re-implementation of the original Simon et al.
14963     *     Fortran code differs from the original in the following respects:
14964     *<ul>
14965     *       <li>  C instead of Fortran.
14966     *
14967     *       <li>  The date is supplied in two parts.
14968     *
14969     *       <li>  The result is returned only in equatorial Cartesian form;
14970     *          the ecliptic longitude, latitude and radius vector are not
14971     *          returned.
14972     *
14973     *       <li>  The result is in the J2000.0 equatorial frame, not ecliptic.
14974     *
14975     *       <li>  More is done in-line: there are fewer calls to subroutines.
14976     *
14977     *       <li>  Different error/warning status values are used.
14978     *
14979     *       <li>  A different Kepler's-equation-solver is used (avoiding
14980     *          use of double precision complex).
14981     *
14982     *       <li>  Polynomials in t are nested to minimize rounding errors.
14983     *
14984     *       <li>  Explicit double constants are used to avoid mixed-mode
14985     *          expressions.
14986     *</ul>
14987     *     None of the above changes affects the result significantly.
14988     *
14989     * <li> The returned status indicates the most serious condition
14990     *     encountered during execution of the function.  Illegal np is
14991     *     considered the most serious, overriding failure to converge,
14992     *     which in turn takes precedence over the remote date warning.
14993     *</ol>
14994     *<p>Called:<ul>
14995     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
14996     * </ul>
14997     *<p>Reference:  Simon, J.L, Bretagnon, P., Chapront, J.,
14998     *              Chapront-Touze, M., Francou, G., and Laskar, J.,
14999     *              Astron. Astrophys. 282, 663 (1994).
15000     *
15001     *@version 2009 December 17
15002     *
15003     *  @since Release 20101201
15004     *
15005     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15006     */
15007     public static int jauPlan94(double date1, double date2, int np, double pv[][])
15008     {
15009     /* Gaussian constant */
15010        final double GK = 0.017202098950;
15011 
15012     /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */
15013        final double SINEPS = 0.3977771559319137;
15014        final double COSEPS = 0.9174820620691818;
15015 
15016     /* Maximum number of iterations allowed to solve Kepler's equation */
15017        final int KMAX = 10;
15018 
15019        int jstat, i, k;
15020        double t, da, dl, de, dp, di, dom, dmu, arga, argl, am,
15021               ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw,
15022               xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z;
15023 
15024     /* Planetary inverse masses */
15025        final double amas[] = { 6023600.0,       /* Mercury */
15026                                        408523.5,       /* Venus   */
15027                                        328900.5,       /* EMB     */
15028                                       3098710.0,       /* Mars    */
15029                                          1047.355,     /* Jupiter */
15030                                          3498.5,       /* Saturn  */
15031                                         22869.0,       /* Uranus  */
15032                                         19314.0 };     /* Neptune */
15033 
15034     /*
15035     * Tables giving the mean Keplerian elements, limited to t^2 terms:
15036     *
15037     *   a       semi-major axis (au)
15038     *   dlm     mean longitude (degree and arcsecond)
15039     *   e       eccentricity
15040     *   pi      longitude of the perihelion (degree and arcsecond)
15041     *   dinc    inclination (degree and arcsecond)
15042     *   omega   longitude of the ascending node (degree and arcsecond)
15043     */
15044 
15045        final double a[][] = {
15046            {  0.3870983098,           0.0,     0.0 },  /* Mercury */
15047            {  0.7233298200,           0.0,     0.0 },  /* Venus   */
15048            {  1.0000010178,           0.0,     0.0 },  /* EMB     */
15049            {  1.5236793419,         3e-10,     0.0 },  /* Mars    */
15050            {  5.2026032092,     19132e-10, -39e-10 },  /* Jupiter */
15051            {  9.5549091915, -0.0000213896, 444e-10 },  /* Saturn  */
15052            { 19.2184460618,     -3716e-10, 979e-10 },  /* Uranus  */
15053            { 30.1103868694,    -16635e-10, 686e-10 }   /* Neptune */
15054        };
15055 
15056        final double dlm[][] = {
15057            { 252.25090552, 5381016286.88982,  -1.92789 },
15058            { 181.97980085, 2106641364.33548,   0.59381 },
15059            { 100.46645683, 1295977422.83429,  -2.04411 },
15060            { 355.43299958,  689050774.93988,   0.94264 },
15061            {  34.35151874,  109256603.77991, -30.60378 },
15062            {  50.07744430,   43996098.55732,  75.61614 },
15063            { 314.05500511,   15424811.93933,  -1.75083 },
15064            { 304.34866548,    7865503.20744,   0.21103 }
15065        };
15066 
15067        final double e[][] = {
15068            { 0.2056317526,  0.0002040653,    -28349e-10 },
15069            { 0.0067719164, -0.0004776521,     98127e-10 },
15070            { 0.0167086342, -0.0004203654, -0.0000126734 },
15071            { 0.0934006477,  0.0009048438,    -80641e-10 },
15072            { 0.0484979255,  0.0016322542, -0.0000471366 },
15073            { 0.0555481426, -0.0034664062, -0.0000643639 },
15074            { 0.0463812221, -0.0002729293,  0.0000078913 },
15075            { 0.0094557470,  0.0000603263,           0.0 }
15076        };
15077 
15078        final double pi[][] = {
15079            {  77.45611904,  5719.11590,   -4.83016 },
15080            { 131.56370300,   175.48640, -498.48184 },
15081            { 102.93734808, 11612.35290,   53.27577 },
15082            { 336.06023395, 15980.45908,  -62.32800 },
15083            {  14.33120687,  7758.75163,  259.95938 },
15084            {  93.05723748, 20395.49439,  190.25952 },
15085            { 173.00529106,  3215.56238,  -34.09288 },
15086            {  48.12027554,  1050.71912,   27.39717 }
15087        };
15088 
15089        final double dinc[][] = {
15090            { 7.00498625, -214.25629,   0.28977 },
15091            { 3.39466189,  -30.84437, -11.67836 },
15092            {        0.0,  469.97289,  -3.35053 },
15093            { 1.84972648, -293.31722,  -8.11830 },
15094            { 1.30326698,  -71.55890,  11.95297 },
15095            { 2.48887878,   91.85195, -17.66225 },
15096            { 0.77319689,  -60.72723,   1.25759 },
15097            { 1.76995259,    8.12333,   0.08135 }
15098        };
15099 
15100        final double omega[][] = {
15101            {  48.33089304,  -4515.21727,  -31.79892 },
15102            {  76.67992019, -10008.48154,  -51.32614 },
15103            { 174.87317577,  -8679.27034,   15.34191 },
15104            {  49.55809321, -10620.90088, -230.57416 },
15105            { 100.46440702,   6362.03561,  326.52178 },
15106            { 113.66550252,  -9240.19942,  -66.23743 },
15107            {  74.00595701,   2669.15033,  145.93964 },
15108            { 131.78405702,   -221.94322,   -0.78728 }
15109        };
15110 
15111     /* Tables for trigonometric terms to be added to the mean elements of */
15112     /* the semi-major axes */
15113 
15114        final double kp[][] = {
15115         {   69613, 75645, 88306, 59899, 15746, 71087, 142173,  3086,    0 },
15116         {   21863, 32794, 26934, 10931, 26250, 43725,  53867, 28939,    0 },
15117         {   16002, 21863, 32004, 10931, 14529, 16368,  15318, 32794,    0 },
15118         {    6345,  7818, 15636,  7077,  8184, 14163,   1107,  4872,    0 },
15119         {    1760,  1454,  1167,   880,   287,  2640,     19,  2047, 1454 },
15120         {     574,     0,   880,   287,    19,  1760,   1167,   306,  574 },
15121         {     204,     0,   177,  1265,     4,   385,    200,   208,  204 },
15122         {       0,   102,   106,     4,    98,  1367,    487,   204,    0 }
15123        };
15124 
15125        final double ca[][] = {
15126         {       4,    -13,    11,   -9,    -9,   -3,     -1,     4,     0 },
15127         {    -156,     59,   -42,    6,    19,  -20,    -10,   -12,     0 },
15128         {      64,   -152,    62,   -8,    32,  -41,     19,   -11,     0 },
15129         {     124,    621,  -145,  208,    54,  -57,     30,    15,     0 },
15130         {  -23437,  -2634,  6601, 6259, -1507,-1821,   2620, -2115, -1489 },
15131         {   62911,-119919, 79336,17814,-24241,12068,   8306, -4893,  8902 },
15132         {  389061,-262125,-44088, 8387,-22976,-2093,   -615, -9720,  6633 },
15133         { -412235,-157046,-31430,37817, -9740,  -13,  -7449,  9644,     0 }
15134        };
15135 
15136        final double sa[][] = {
15137         {     -29,    -1,     9,     6,    -6,     5,     4,     0,     0 },
15138         {     -48,  -125,   -26,   -37,    18,   -13,   -20,    -2,     0 },
15139         {    -150,   -46,    68,    54,    14,    24,   -28,    22,     0 },
15140         {    -621,   532,  -694,   -20,   192,   -94,    71,   -73,     0 },
15141         {  -14614,-19828, -5869,  1881, -4372, -2255,   782,   930,   913 },
15142         {  139737,     0, 24667, 51123, -5102,  7429, -4095, -1976, -9566 },
15143         { -138081,     0, 37205,-49039,-41901,-33872,-27037,-12474, 18797 },
15144         {       0, 28492,133236, 69654, 52322,-49577,-26430, -3593,     0 }
15145        };
15146 
15147     /* Tables giving the trigonometric terms to be added to the mean */
15148     /* elements of the mean longitudes */
15149 
15150        final double kq[][] = {
15151         {   3086,15746,69613,59899,75645,88306, 12661,  2658,    0,     0 },
15152         {  21863,32794,10931,   73, 4387,26934,  1473,  2157,    0,     0 },
15153         {     10,16002,21863,10931, 1473,32004,  4387,    73,    0,     0 },
15154         {     10, 6345, 7818, 1107,15636, 7077,  8184,   532,   10,     0 },
15155         {     19, 1760, 1454,  287, 1167,  880,   574,  2640,   19,  1454 },
15156         {     19,  574,  287,  306, 1760,   12,    31,    38,   19,   574 },
15157         {      4,  204,  177,    8,   31,  200,  1265,   102,    4,   204 },
15158         {      4,  102,  106,    8,   98, 1367,   487,   204,    4,   102 }
15159        };
15160 
15161        final double cl[][] = {
15162         {      21,   -95, -157,   41,   -5,   42,  23,  30,      0,     0 },
15163         {    -160,  -313, -235,   60,  -74,  -76, -27,  34,      0,     0 },
15164         {    -325,  -322,  -79,  232,  -52,   97,  55, -41,      0,     0 },
15165         {    2268,  -979,  802,  602, -668,  -33, 345, 201,    -55,     0 },
15166         {    7610, -4997,-7689,-5841,-2617, 1115,-748,-607,   6074,   354 },
15167         {  -18549, 30125,20012, -730,  824,   23,1289,-352, -14767, -2062 },
15168         { -135245,-14594, 4197,-4030,-5630,-2898,2540,-306,   2939,  1986 },
15169         {   89948,  2103, 8963, 2695, 3682, 1648, 866,-154,  -1963,  -283 }
15170        };
15171 
15172        final double sl[][] = {
15173         {   -342,   136,  -23,   62,   66,  -52, -33,    17,     0,     0 },
15174         {    524,  -149,  -35,  117,  151,  122, -71,   -62,     0,     0 },
15175         {   -105,  -137,  258,   35, -116,  -88,-112,   -80,     0,     0 },
15176         {    854,  -205, -936, -240,  140, -341, -97,  -232,   536,     0 },
15177         { -56980,  8016, 1012, 1448,-3024,-3710, 318,   503,  3767,   577 },
15178         { 138606,-13478,-4964, 1441,-1319,-1482, 427,  1236, -9167, -1918 },
15179         {  71234,-41116, 5334,-4935,-1848,   66, 434, -1748,  3780,  -701 },
15180         { -47645, 11647, 2166, 3194,  679,    0,-244,  -419, -2531,    48 }
15181        };
15182 
15183     /*--------------------------------------------------------------------*/
15184 
15185     /* Validate the planet number. */
15186        if ((np < 1) || (np > 8)) {
15187           jstat = -1;
15188 
15189        /* Reset the result in case of failure. */
15190           for (k = 0; k < 2; k++) {
15191              for (i = 0; i < 3; i++) {
15192                 pv[k][i] = 0.0;
15193              }
15194           }
15195 
15196        } else {
15197 
15198        /* Decrement the planet number to start at zero. */
15199           np--;
15200 
15201        /* Time: Julian millennia since J2000.0. */
15202           t = ((date1 - DJ00) + date2) / DJM;
15203 
15204        /* OK status unless remote date. */
15205           jstat = abs(t) <= 1.0 ? 0 : 1;
15206 
15207        /* Compute the mean elements. */
15208           da = a[np][0] +
15209               (a[np][1] +
15210                a[np][2] * t) * t;
15211           dl = (3600.0 * dlm[np][0] +
15212                         (dlm[np][1] +
15213                          dlm[np][2] * t) * t) * DAS2R;
15214           de = e[np][0] +
15215              ( e[np][1] +
15216                e[np][2] * t) * t;
15217           dp = jauAnpm((3600.0 * pi[np][0] +
15218                                 (pi[np][1] +
15219                                  pi[np][2] * t) * t) * DAS2R);
15220           di = (3600.0 * dinc[np][0] +
15221                         (dinc[np][1] +
15222                          dinc[np][2] * t) * t) * DAS2R;
15223           dom = jauAnpm((3600.0 * omega[np][0] +
15224                                  (omega[np][1] +
15225                                   omega[np][2] * t) * t) * DAS2R);
15226 
15227        /* Apply the trigonometric terms. */
15228           dmu = 0.35953620 * t;
15229           for (k = 0; k < 8; k++) {
15230              arga = kp[np][k] * dmu;
15231              argl = kq[np][k] * dmu;
15232              da += (ca[np][k] * cos(arga) +
15233                     sa[np][k] * sin(arga)) * 1e-7;
15234              dl += (cl[np][k] * cos(argl) +
15235                     sl[np][k] * sin(argl)) * 1e-7;
15236           }
15237           arga = kp[np][8] * dmu;
15238           da += t * (ca[np][8] * cos(arga) +
15239                      sa[np][8] * sin(arga)) * 1e-7;
15240           for (k = 8; k < 10; k++) {
15241              argl = kq[np][k] * dmu;
15242              dl += t * (cl[np][k] * cos(argl) +
15243                         sl[np][k] * sin(argl)) * 1e-7;
15244           }
15245           dl = fmod(dl, D2PI);
15246 
15247        /* Iterative soln. of Kepler's equation to get eccentric anomaly. */
15248           am = dl - dp;
15249           ae = am + de * sin(am);
15250           k = 0;
15251           dae = 1.0;
15252           while (k < KMAX && abs(dae) > 1e-12) {
15253              dae = (am - ae + de * sin(ae)) / (1.0 - de * cos(ae));
15254              ae += dae;
15255              k++;
15256              if (k == KMAX-1) jstat = 2;
15257           }
15258 
15259        /* True anomaly. */
15260           ae2 = ae / 2.0;
15261           at = 2.0 * atan2(sqrt((1.0 + de) / (1.0 - de)) * sin(ae2),
15262                                                            cos(ae2));
15263 
15264        /* Distance (au) and speed (radians per day). */
15265           r = da * (1.0 - de * cos(ae));
15266           v = GK * sqrt((1.0 + 1.0 / amas[np]) / (da * da * da));
15267 
15268           si2 = sin(di / 2.0);
15269           xq = si2 * cos(dom);
15270           xp = si2 * sin(dom);
15271           tl = at + dp;
15272           xsw = sin(tl);
15273           xcw = cos(tl);
15274           xm2 = 2.0 * (xp * xcw - xq * xsw);
15275           xf = da / sqrt(1  -  de * de);
15276           ci2 = cos(di / 2.0);
15277           xms = (de * sin(dp) + xsw) * xf;
15278           xmc = (de * cos(dp) + xcw) * xf;
15279           xpxq2 = 2 * xp * xq;
15280 
15281        /* Position (J2000.0 ecliptic x,y,z in au). */
15282           x = r * (xcw - xm2 * xp);
15283           y = r * (xsw + xm2 * xq);
15284           z = r * (-xm2 * ci2);
15285 
15286        /* Rotate to equatorial. */
15287           pv[0][0] = x;
15288           pv[0][1] = y * COSEPS - z * SINEPS;
15289           pv[0][2] = y * SINEPS + z * COSEPS;
15290 
15291        /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in au/d). */
15292           x = v * (( -1.0 + 2.0 * xp * xp) * xms + xpxq2 * xmc);
15293           y = v * ((  1.0 - 2.0 * xq * xq) * xmc - xpxq2 * xms);
15294           z = v * (2.0 * ci2 * (xp * xms + xq * xmc));
15295 
15296        /* Rotate to equatorial. */
15297           pv[1][0] = x;
15298           pv[1][1] = y * COSEPS - z * SINEPS;
15299           pv[1][2] = y * SINEPS + z * COSEPS;
15300 
15301        }
15302 
15303     /* Return the status. */
15304        return jstat;
15305 
15306         }
15307     
15308 
15309     /**
15310     *  Modulus of p-vector.
15311     *
15312     *<p>This function is derived from the International Astronomical Union's
15313     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15314     *
15315     *<p>Status:  vector/matrix support function.
15316     *
15317     *<!-- Given: -->
15318     *     @param p       double[3]      p-vector
15319     *
15320     * <!-- Returned (function value): -->
15321     *  @return double        modulus
15322     *
15323     *@version 2008 May 22
15324     *
15325     *  @since Release 20101201
15326     *
15327     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15328     */
15329     public static double jauPm(double p[] )
15330     {
15331        double w;
15332 
15333 
15334        w  = sqrt( p[0] * p[0]
15335                 + p[1] * p[1]
15336                 + p[2] * p[2] );
15337 
15338        return w;
15339 
15340         }
15341     
15342 
15343     /**
15344     *  Precession matrix (including frame bias) from GCRS to a specified
15345     *  date, IAU 2000 model.
15346     *
15347     *<p>This function is derived from the International Astronomical Union's
15348     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15349     *
15350     *<p>Status:  support function.
15351     *
15352     *<!-- Given: -->
15353     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15354     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15355     *
15356     *<!-- Returned: -->
15357     *     @return rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 2)
15358     *
15359     * <p>Notes:
15360     * <ol>
15361     *
15362     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15363     *     convenient way between the two arguments.  For example,
15364     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15365     *     among others:
15366     *<pre>
15367     *            date1          date2
15368     *
15369     *         2450123.7           0.0       (JD method)
15370     *         2451545.0       -1421.3       (J2000 method)
15371     *         2400000.5       50123.2       (MJD method)
15372     *         2450123.5           0.2       (date &amp; time method)
15373     *</pre>
15374     *     The JD method is the most natural and convenient to use in
15375     *     cases where the loss of several decimal digits of resolution
15376     *     is acceptable.  The J2000 method is best matched to the way
15377     *     the argument is handled internally and will deliver the
15378     *     optimum resolution.  The MJD method and the date &amp; time methods
15379     *     are both good compromises between resolution and convenience.
15380     *
15381     * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15382     *     the p-vector V(GCRS) is with respect to the Geocentric Celestial
15383     *     Reference System (IAU, 2000) and the p-vector V(date) is with
15384     *     respect to the mean equatorial triad of the given date.
15385     *</ol>
15386     *<p>Called:<ul>
15387     *     <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15388     * </ul>
15389     *<p>Reference:
15390     *
15391     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
15392     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
15393     *     (2000)
15394     *
15395     *@version 2009 December 21
15396     *
15397     *  @since Release 20101201
15398     *
15399     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15400     */
15401     public static double[][] jauPmat00(double date1, double date2)
15402     {
15403        double rb[][] = new double[3][3], rp[][] = new double[3][3],
15404            rbp[][] = new double[3][3];
15405     /* Obtain the required matrix (discarding others). */
15406        jauBp00(date1, date2, rb, rp, rbp);
15407 
15408        return rbp;
15409 
15410         }
15411     
15412 
15413     /**
15414     *  Precession matrix (including frame bias) from GCRS to a specified
15415     *  date, IAU 2006 model.
15416     *
15417     *<p>This function is derived from the International Astronomical Union's
15418     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15419     *
15420     *<p>Status:  support function.
15421     *
15422     *<!-- Given: -->
15423     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15424     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15425     *
15426     *<!-- Returned: -->
15427     *     @return rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 2)
15428     *
15429     * <p>Notes:
15430     * <ol>
15431     *
15432     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15433     *     convenient way between the two arguments.  For example,
15434     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15435     *     among others:
15436     *<pre>
15437     *            date1          date2
15438     *
15439     *         2450123.7           0.0       (JD method)
15440     *         2451545.0       -1421.3       (J2000 method)
15441     *         2400000.5       50123.2       (MJD method)
15442     *         2450123.5           0.2       (date &amp; time method)
15443     *</pre>
15444     *     The JD method is the most natural and convenient to use in
15445     *     cases where the loss of several decimal digits of resolution
15446     *     is acceptable.  The J2000 method is best matched to the way
15447     *     the argument is handled internally and will deliver the
15448     *     optimum resolution.  The MJD method and the date &amp; time methods
15449     *     are both good compromises between resolution and convenience.
15450     *
15451     * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15452     *     the p-vector V(GCRS) is with respect to the Geocentric Celestial
15453     *     Reference System (IAU, 2000) and the p-vector V(date) is with
15454     *     respect to the mean equatorial triad of the given date.
15455     *</ol>
15456     *<p>Called:<ul>
15457     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
15458     *     <li>{@link #jauFw2m} F-W angles to r-matrix
15459     * </ul>
15460     *<p>References:
15461     *
15462     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
15463     *
15464     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
15465     *
15466     *@version 2009 December 21
15467     *
15468     *  @since Release 20101201
15469     *
15470     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15471     */
15472     public static double[][] jauPmat06(double date1, double date2)
15473     {
15474 
15475     /* Bias-precession Fukushima-Williams angles. */
15476        FWPrecessionAngles fw = jauPfw06(date1, date2);
15477 
15478     /* Form the matrix. */
15479        double[][] rbp = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
15480 
15481        return rbp;
15482 
15483         }
15484     
15485 
15486     /**
15487     *  Precession matrix from J2000.0 to a specified date, IAU 1976 model.
15488     *
15489     *<p>This function is derived from the International Astronomical Union's
15490     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15491     *
15492     *<p>Status:  support function.
15493     *
15494     *<!-- Given: -->
15495     *     @param date1 double        ending date, TT (Note 1)
15496     *     @param date2 double        ending date, TT (Note 1) 
15497     *
15498     *<!-- Returned: -->
15499     *     @return rmatp        double[3][3]   <u>returned</u> precession matrix, J2000.0 -&gt; date1+date2
15500     *
15501     * <p>Notes:
15502     * <ol>
15503     *
15504     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15505     *     convenient way between the two arguments.  For example,
15506     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15507     *     among others:
15508     *<pre>
15509     *            date1          date2
15510     *
15511     *         2450123.7           0.0       (JD method)
15512     *         2451545.0       -1421.3       (J2000 method)
15513     *         2400000.5       50123.2       (MJD method)
15514     *         2450123.5           0.2       (date &amp; time method)
15515     *</pre>
15516     *     The JD method is the most natural and convenient to use in
15517     *     cases where the loss of several decimal digits of resolution
15518     *     is acceptable.  The J2000 method is best matched to the way
15519     *     the argument is handled internally and will deliver the
15520     *     optimum resolution.  The MJD method and the date &amp; time methods
15521     *     are both good compromises between resolution and convenience.
15522     *
15523     * <li> The matrix operates in the sense V(date) = RMATP * V(J2000),
15524     *     where the p-vector V(J2000) is with respect to the mean
15525     *     equatorial triad of epoch J2000.0 and the p-vector V(date)
15526     *     is with respect to the mean equatorial triad of the given
15527     *     date.
15528     *
15529     * <li> Though the matrix method itself is rigorous, the precession
15530     *     angles are expressed through canonical polynomials which are
15531     *     valid only for a limited time span.  In addition, the IAU 1976
15532     *     precession rate is known to be imperfect.  The absolute accuracy
15533     *     of the present formulation is better than 0.1 arcsec from
15534     *     1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD,
15535     *     and remains below 3 arcsec for the whole of the period
15536     *     500BC to 3000AD.  The errors exceed 10 arcsec outside the
15537     *     range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to
15538     *     5600AD and exceed 1000 arcsec outside 6800BC to 8200AD.
15539     *</ol>
15540     *<p>Called:<ul>
15541     *     <li>{@link #jauPrec76} accumulated precession angles, IAU 1976
15542     *     <li>{@link #jauIr} initialize r-matrix to identity
15543     *     <li>{@link #jauRz} rotate around Z-axis
15544     *     <li>{@link #jauRy} rotate around Y-axis
15545     *     <li>{@link #jauCr} copy r-matrix
15546     * </ul>
15547     *<p>References:
15548     *
15549     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
15550     *      equations (6) &amp; (7), p283.
15551     *
15552     *     Kaplan,G.H., 1981. USNO circular no. 163, pA2.
15553     *
15554     *@version 2009 December 18
15555     *
15556     *  @since Release 20101201
15557     *
15558     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15559     */
15560     public static double[][] jauPmat76(double date1, double date2)
15561     {
15562        double wmat[][] = new double[3][3];
15563        double rmatp[][] = new double[3][3];
15564 
15565     /* Precession Euler angles, J2000.0 to specified date. */
15566        EulerAngles euler = jauPrec76(DJ00, 0.0, date1, date2);
15567 
15568     /* Form the rotation matrix. */
15569        jauIr(  wmat);
15570        jauRz( -euler.zeta, wmat);
15571        jauRy(  euler.theta, wmat);
15572        jauRz( -euler.z, wmat);
15573        jauCr(wmat, rmatp);
15574 
15575        return rmatp;
15576 
15577         }
15578     
15579 
15580     /**
15581     *  P-vector subtraction.
15582     *
15583     *<p>This function is derived from the International Astronomical Union's
15584     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15585     *
15586     *<p>Status:  vector/matrix support function.
15587     *
15588     *<!-- Given: -->
15589     *     @param a         double[3]       first p-vector
15590     *     @param b         double[3]       second p-vector
15591     *
15592     *<!-- Returned: -->
15593     *     @return amb       double[3]        <u>returned</u> a - b
15594     *
15595     *  Note:
15596     *     It is permissible to re-use the same array for any of the
15597     *     arguments.
15598     *
15599     *@version 2008 November 18
15600     *
15601     *  @since Release 20101201
15602     *
15603     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15604     */
15605     public static double[]  jauPmp(double a[] , double b[]  )
15606     {
15607        double amb[] = new double[3];
15608        amb[0] = a[0] - b[0];
15609        amb[1] = a[1] - b[1];
15610        amb[2] = a[2] - b[2];
15611 
15612        return amb;
15613 
15614         }
15615     
15616     /**
15617      * A normalized vector with r being the modulus and u[3] being the unit vector.
15618      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
15619      * 
15620      * @since AIDA Stage 1
15621      */
15622     public static class NormalizedVector {
15623         public double r;
15624         public double u[];
15625         public NormalizedVector(double r, double u[] ) {
15626             this.r = r;
15627             this.u = u;
15628         }
15629     }
15630     /**
15631     *  Convert a p-vector into modulus and unit vector.
15632     *
15633     *<p>This function is derived from the International Astronomical Union's
15634     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15635     *
15636     *<p>Status:  vector/matrix support function.
15637     *
15638     *<!-- Given: -->
15639     *     @param p         double[3]       p-vector
15640     *
15641     *<!-- Returned: -->
15642     *     @return r         double           <u>returned</u> modulus
15643     *             u         double[3]        <u>returned</u> unit vector
15644     *
15645     * <p>Notes:
15646     * <ol>
15647     *
15648     * <li> If p is null, the result is null.  Otherwise the result is a unit
15649     *     vector.
15650     *
15651     * <li> It is permissible to re-use the same array for any of the
15652     *     arguments.
15653     *</ol>
15654     *<p>Called:<ul>
15655     *     <li>{@link #jauPm} modulus of p-vector
15656     *     <li>{@link #jauZp} zero p-vector
15657     *     <li>{@link #jauSxp} multiply p-vector by scalar
15658     * </ul>
15659     *@version 2008 November 18
15660     *
15661     *  @since Release 20101201
15662     *
15663     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15664     */
15665     public static NormalizedVector jauPn(double p[])
15666     {
15667        double w;
15668 
15669     /* Obtain the modulus and test for zero. */
15670        w = jauPm(p);
15671        NormalizedVector nv = new NormalizedVector(w, new double[3]);
15672        if (w == 0.0) {
15673 
15674        /* Null vector. */
15675           jauZp(nv.u);
15676 
15677        } else {
15678 
15679        /* Unit vector. */
15680            nv.u = jauSxp(1.0/w, p);
15681        }
15682 
15683 
15684        return nv;
15685 
15686         }
15687     
15688 
15689     /**
15690     *  Precession-nutation, IAU 2000 model:  a multi-purpose function,
15691     *  supporting classical (equinox-based) use directly and CIO-based
15692     *  use indirectly.
15693     *
15694     *<p>This function is derived from the International Astronomical Union's
15695     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15696     *
15697     *<p>Status:  support function.
15698     *
15699     *<!-- Given: -->
15700     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15701     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15702     *     @param dpsi double           nutation (Note 2)
15703     *     @param deps double           nutation (Note 2) 
15704     *
15705     *<!-- Returned: -->
15706     *     @return epsa          double            <u>returned</u> mean obliquity (Note 3),
15707     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4),
15708     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5),
15709     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6),
15710     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7),
15711     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Note 8)
15712     *
15713     * <p>Notes:
15714     * <ol>
15715     *
15716     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15717     *     convenient way between the two arguments.  For example,
15718     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15719     *     among others:
15720     *<pre>
15721     *            date1          date2
15722     *
15723     *         2450123.7           0.0       (JD method)
15724     *         2451545.0       -1421.3       (J2000 method)
15725     *         2400000.5       50123.2       (MJD method)
15726     *         2450123.5           0.2       (date &amp; time method)
15727     *</pre>
15728     *     The JD method is the most natural and convenient to use in
15729     *     cases where the loss of several decimal digits of resolution
15730     *     is acceptable.  The J2000 method is best matched to the way
15731     *     the argument is handled internally and will deliver the
15732     *     optimum resolution.  The MJD method and the date &amp; time methods
15733     *     are both good compromises between resolution and convenience.
15734     *
15735     * <li> The caller is responsible for providing the nutation components;
15736     *     they are in longitude and obliquity, in radians and are with
15737     *     respect to the equinox and ecliptic of date.  For high-accuracy
15738     *     applications, free core nutation should be included as well as
15739     *     any other relevant corrections to the position of the CIP.
15740     *
15741     * <li> The returned mean obliquity is consistent with the IAU 2000
15742     *     precession-nutation models.
15743     *
15744     * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
15745     *     equator and equinox by applying frame bias.
15746     *
15747     * <li> The matrix rp transforms vectors from J2000.0 mean equator and
15748     *     equinox to mean equator and equinox of date by applying
15749     *     precession.
15750     *
15751     * <li> The matrix rbp transforms vectors from GCRS to mean equator and
15752     *     equinox of date by applying frame bias then precession.  It is
15753     *     the product rp x rb.
15754     *
15755     * <li> The matrix rn transforms vectors from mean equator and equinox of
15756     *     date to true equator and equinox of date by applying the nutation
15757     *     (luni-solar + planetary).
15758     *
15759     * <li> The matrix rbpn transforms vectors from GCRS to true equator and
15760     *     equinox of date.  It is the product rn x rbp, applying frame
15761     *     bias, precession and nutation in that order.
15762     *
15763     * <li> It is permissible to re-use the same array in the returned
15764     *     arguments.  The arrays are filled in the order given.
15765     *</ol>
15766     *<p>Called:<ul>
15767     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
15768     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
15769     *     <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15770     *     <li>{@link #jauCr} copy r-matrix
15771     *     <li>{@link #jauNumat} form nutation matrix
15772     *     <li>{@link #jauRxr} product of two r-matrices
15773     * </ul>
15774     *<p>Reference:
15775     *
15776     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15777     *     "Expressions for the Celestial Intermediate Pole and Celestial
15778     *     Ephemeris Origin consistent with the IAU 2000A precession-
15779     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15780     *
15781     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15782     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
15783     *
15784     *@version 2010 January 18
15785     *
15786     *  @since Release 20101201
15787     *
15788     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15789     */
15790     public static PrecessionNutation  jauPn00(double date1, double date2, double dpsi, double deps)
15791     {
15792        double  rbpw[][] = new double[3][3], rnw[][] = new double[3][3];
15793        double[][] rb = new double[3][3];
15794        double[][] rp = new double[3][3];
15795        double[][] rbp = new double[3][3];
15796        double[][] rn = new double[3][3];
15797        double[][] rbpn = new double[3][3];
15798 
15799 
15800     /* IAU 2000 precession-rate adjustments. */
15801        PrecessionDeltaTerms nut = jauPr00(date1, date2);
15802 
15803     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
15804        double epsa = jauObl80(date1, date2) + nut.depspr;
15805 
15806     /* Frame bias and precession matrices and their product. */
15807        jauBp00(date1, date2, rb, rp, rbpw);
15808        jauCr(rbpw, rbp);
15809 
15810     /* Nutation matrix. */
15811        rnw = jauNumat(epsa, dpsi, deps);
15812        jauCr(rnw, rn);
15813 
15814     /* Bias-precession-nutation matrix (classical). */
15815        rbpn = jauRxr(rnw, rbpw);
15816 
15817        return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
15818 
15819         }
15820     
15821 
15822     /**
15823      * Precession-nutation model. 
15824      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
15825      * 
15826      * @since AIDA Stage 1
15827      */
15828     public static class PrecessionNutation {
15829         public NutationTerms nut;
15830         /** mean obliquity */
15831         public  double epsa;
15832         /** frame bias matrix */
15833         public double rb[][];
15834         /** precession matrix  */
15835         public  double rp[][];
15836         /** bias-precession matrix */
15837         public  double rbp[][];
15838         /** nutation matrix  */
15839         public double rn[][];
15840         /** GCRS-to-true matrix */
15841         public double rbpn[][];
15842         public PrecessionNutation(double dpsi, double deps, double epsa,
15843                   double rb[][], double rp[][], double rbp[][],
15844                   double rn[][], double rbpn[][]){
15845             this.nut = new NutationTerms(dpsi, deps);
15846             this.epsa = epsa;
15847             this.rb = rb; 
15848             this.rp = rp;
15849             this.rbp = rbp;
15850             this.rn = rn;
15851             this.rbpn = rbpn;
15852         }
15853         
15854     }
15855     /**
15856     *  Precession-nutation, IAU 2000A model:  a multi-purpose function,
15857     *  supporting classical (equinox-based) use directly and CIO-based
15858     *  use indirectly.
15859     *
15860     *<p>This function is derived from the International Astronomical Union's
15861     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15862     *
15863     *<p>Status:  support function.
15864     *
15865     *<!-- Given: -->
15866     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15867     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15868     *
15869     *<!-- Returned: -->
15870     *     @return dpsi double            <u>returned</u> nutation (Note 2)
15871     *             deps double            <u>returned</u> nutation (Note 2) 
15872     *             epsa          double            <u>returned</u> mean obliquity (Note 3)
15873     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
15874     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
15875     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
15876     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
15877     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15878     *
15879     * <p>Notes:
15880     * <ol>
15881     *
15882     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
15883     *      convenient way between the two arguments.  For example,
15884     *      JD(TT)=2450123.7 could be expressed in any of these ways,
15885     *      among others:
15886     *<pre>
15887     *             date1          date2
15888     *
15889     *          2450123.7           0.0       (JD method)
15890     *          2451545.0       -1421.3       (J2000 method)
15891     *          2400000.5       50123.2       (MJD method)
15892     *          2450123.5           0.2       (date &amp; time method)
15893     *</pre>
15894     *      The JD method is the most natural and convenient to use in
15895     *      cases where the loss of several decimal digits of resolution
15896     *      is acceptable.  The J2000 method is best matched to the way
15897     *      the argument is handled internally and will deliver the
15898     *      optimum resolution.  The MJD method and the date &amp; time methods
15899     *      are both good compromises between resolution and convenience.
15900     *
15901     * <li>  The nutation components (luni-solar + planetary, IAU 2000A) in
15902     *      longitude and obliquity are in radians and with respect to the
15903     *      equinox and ecliptic of date.  Free core nutation is omitted;
15904     *      for the utmost accuracy, use the jauPn00  function, where the
15905     *      nutation components are caller-specified.  For faster but
15906     *      slightly less accurate results, use the jauPn00b function.
15907     *
15908     * <li>  The mean obliquity is consistent with the IAU 2000 precession.
15909     *
15910     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
15911     *      equator and equinox by applying frame bias.
15912     *
15913     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
15914     *      equinox to mean equator and equinox of date by applying
15915     *      precession.
15916     *
15917     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
15918     *      equinox of date by applying frame bias then precession.  It is
15919     *      the product rp x rb.
15920     *
15921     * <li>  The matrix rn transforms vectors from mean equator and equinox
15922     *      of date to true equator and equinox of date by applying the
15923     *      nutation (luni-solar + planetary).
15924     *
15925     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
15926     *      equinox of date.  It is the product rn x rbp, applying frame
15927     *      bias, precession and nutation in that order.
15928     *
15929     * <li>  The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate
15930     *      Pole are elements (3,1-3) of the GCRS-to-true matrix,
15931     *       i.e. rbpn[2][0-2].
15932     *
15933     *  <li> It is permissible to re-use the same array in the returned
15934     *      arguments.  The arrays are filled in the order given.
15935     *</ol>
15936     *<p>Called:<ul>
15937     *     <li>{@link #jauNut00a} nutation, IAU 2000A
15938     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
15939     * </ul>
15940     *<p>Reference:
15941     *
15942     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15943     *     "Expressions for the Celestial Intermediate Pole and Celestial
15944     *     Ephemeris Origin consistent with the IAU 2000A precession-
15945     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15946     *
15947     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15948     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
15949     *
15950     *@version 2010 January 18
15951     *
15952     *  @since Release 20101201
15953     *
15954     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15955     */
15956     public static PrecessionNutation jauPn00a(double date1, double date2)
15957     {
15958     /* Nutation. */
15959        NutationTerms nut = jauNut00a(date1, date2);
15960 
15961     /* Remaining results. */
15962        return jauPn00(date1, date2, nut.dpsi, nut.deps);
15963 
15964  
15965         }
15966     
15967 
15968     /**
15969     *  Precession-nutation, IAU 2000B model:  a multi-purpose function,
15970     *  supporting classical (equinox-based) use directly and CIO-based
15971     *  use indirectly.
15972     *
15973     *<p>This function is derived from the International Astronomical Union's
15974     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15975     *
15976     *<p>Status:  support function.
15977     *
15978     *<!-- Given: -->
15979     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15980     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15981     *
15982     *<!-- Returned: -->
15983     *     @return dpsi,deps     double            <u>returned</u> nutation (Note 2)
15984     *             epsa          double            <u>returned</u> mean obliquity (Note 3)
15985     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
15986     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
15987     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
15988     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
15989     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15990     *
15991     * <p>Notes:
15992     * <ol>
15993     *
15994     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
15995     *      convenient way between the two arguments.  For example,
15996     *      JD(TT)=2450123.7 could be expressed in any of these ways,
15997     *      among others:
15998     *<pre>
15999     *             date1          date2
16000     *
16001     *          2450123.7           0.0       (JD method)
16002     *          2451545.0       -1421.3       (J2000 method)
16003     *          2400000.5       50123.2       (MJD method)
16004     *          2450123.5           0.2       (date &amp; time method)
16005     *</pre>
16006     *      The JD method is the most natural and convenient to use in
16007     *      cases where the loss of several decimal digits of resolution
16008     *      is acceptable.  The J2000 method is best matched to the way
16009     *      the argument is handled internally and will deliver the
16010     *      optimum resolution.  The MJD method and the date &amp; time methods
16011     *      are both good compromises between resolution and convenience.
16012     *
16013     * <li>  The nutation components (luni-solar + planetary, IAU 2000B) in
16014     *      longitude and obliquity are in radians and with respect to the
16015     *      equinox and ecliptic of date.  For more accurate results, but
16016     *      at the cost of increased computation, use the jauPn00a function.
16017     *      For the utmost accuracy, use the jauPn00  function, where the
16018     *      nutation components are caller-specified.
16019     *
16020     * <li>  The mean obliquity is consistent with the IAU 2000 precession.
16021     *
16022     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
16023     *      equator and equinox by applying frame bias.
16024     *
16025     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
16026     *      equinox to mean equator and equinox of date by applying
16027     *      precession.
16028     *
16029     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
16030     *      equinox of date by applying frame bias then precession.  It is
16031     *      the product rp x rb.
16032     *
16033     * <li>  The matrix rn transforms vectors from mean equator and equinox
16034     *      of date to true equator and equinox of date by applying the
16035     *      nutation (luni-solar + planetary).
16036     *
16037     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
16038     *      equinox of date.  It is the product rn x rbp, applying frame
16039     *      bias, precession and nutation in that order.
16040     *
16041     * <li>  The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16042     *      Pole are elements (3,1-3) of the matrix rbpn.
16043     *
16044     * <li> It is permissible to re-use the same array in the returned
16045     *      arguments.  The arrays are filled in the stated order.
16046     *</ol>
16047     *<p>Called:<ul>
16048     *     <li>{@link #jauNut00b} nutation, IAU 2000B
16049     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
16050     * </ul>
16051     *<p>Reference:
16052     *
16053     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
16054     *     "Expressions for the Celestial Intermediate Pole and Celestial
16055     *     Ephemeris Origin consistent with the IAU 2000A precession-
16056     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003).
16057     *
16058     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
16059     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
16060     *
16061     *@version 2010 January 18
16062     *
16063     *  @since Release 20101201
16064     *
16065     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16066     */
16067     public static PrecessionNutation jauPn00b(double date1, double date2)
16068     {
16069     /* Nutation. */
16070        NutationTerms nut = jauNut00b(date1, date2);
16071 
16072     /* Remaining results. */
16073        return jauPn00(date1, date2, nut.dpsi, nut.deps);
16074 
16075 
16076         }
16077     
16078 
16079     /**
16080     *  Precession-nutation, IAU 2006 model:  a multi-purpose function,
16081     *  supporting classical (equinox-based) use directly and CIO-based use
16082     *  indirectly.
16083     *
16084     *<p>This function is derived from the International Astronomical Union's
16085     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16086     *
16087     *<p>Status:  support function.
16088     *
16089     *<!-- Given: -->
16090     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16091     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16092     *     @param dpsi double           nutation (Note 2)
16093     *     @param deps double           nutation (Note 2) 
16094     *
16095     *<!-- Returned: -->
16096     *     @return epsa          double            <u>returned</u> mean obliquity (Note 3)
16097     *            rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
16098     *            rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
16099     *            rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
16100     *            rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
16101     *            rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Note 8)
16102     *
16103     * <p>Notes:
16104     * <ol>
16105     *
16106     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
16107     *      convenient way between the two arguments.  For example,
16108     *      JD(TT)=2450123.7 could be expressed in any of these ways,
16109     *      among others:
16110     *<pre>
16111     *             date1          date2
16112     *
16113     *          2450123.7           0.0       (JD method)
16114     *          2451545.0       -1421.3       (J2000 method)
16115     *          2400000.5       50123.2       (MJD method)
16116     *          2450123.5           0.2       (date &amp; time method)
16117     *</pre>
16118     *      The JD method is the most natural and convenient to use in
16119     *      cases where the loss of several decimal digits of resolution
16120     *      is acceptable.  The J2000 method is best matched to the way
16121     *      the argument is handled internally and will deliver the
16122     *      optimum resolution.  The MJD method and the date &amp; time methods
16123     *      are both good compromises between resolution and convenience.
16124     *
16125     * <li>  The caller is responsible for providing the nutation components;
16126     *      they are in longitude and obliquity, in radians and are with
16127     *      respect to the equinox and ecliptic of date.  For high-accuracy
16128     *      applications, free core nutation should be included as well as
16129     *      any other relevant corrections to the position of the CIP.
16130     *
16131     * <li>  The returned mean obliquity is consistent with the IAU 2006
16132     *      precession.
16133     *
16134     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
16135     *      equator and equinox by applying frame bias.
16136     *
16137     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
16138     *      equinox to mean equator and equinox of date by applying
16139     *      precession.
16140     *
16141     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
16142     *      equinox of date by applying frame bias then precession.  It is
16143     *      the product rp x rb.
16144     *
16145     * <li>  The matrix rn transforms vectors from mean equator and equinox
16146     *      of date to true equator and equinox of date by applying the
16147     *      nutation (luni-solar + planetary).
16148     *
16149     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
16150     *      equinox of date.  It is the product rn x rbp, applying frame
16151     *      bias, precession and nutation in that order.
16152     *
16153     * <li>  The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16154     *      Pole are elements (3,1-3) of the matrix rbpn.
16155     *
16156     *  <li> It is permissible to re-use the same array in the returned
16157     *      arguments.  The arrays are filled in the stated order.
16158     *</ol>
16159     *<p>Called:<ul>
16160     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16161     *     <li>{@link #jauFw2m} F-W angles to r-matrix
16162     *     <li>{@link #jauCr} copy r-matrix
16163     *     <li>{@link #jauTr} transpose r-matrix
16164     *     <li>{@link #jauRxr} product of two r-matrices
16165     * </ul>
16166     *<p>References:
16167     *
16168     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16169     *
16170     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
16171     *
16172     *@version 2009 December 17
16173     *
16174     *  @since Release 20101201
16175     *
16176     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16177     */
16178     public static PrecessionNutation jauPn06(double date1, double date2, double dpsi, double deps)
16179     {
16180 
16181         double rb[][] = new double[3][3], rbp[][] = new double[3][3], rbpn[][] = new double[3][3];
16182     /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */
16183        FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
16184 
16185     /* B matrix. */
16186        double[][] r1 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
16187        jauCr(r1, rb);
16188 
16189     /* Bias-precession Fukushima-Williams angles of date. */
16190        fw = jauPfw06(date1, date2);
16191 
16192     /* Bias-precession matrix. */
16193        double[][] r2 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
16194        jauCr(r2, rbp);
16195 
16196     /* Solve for precession matrix. */
16197        double[][] rt = jauTr(r1);
16198        double[][] rp = jauRxr(r2, rt);
16199 
16200     /* Equinox-based bias-precession-nutation matrix. */
16201        r1 = jauFw2m(fw.gamb, fw.phib, fw.psib + dpsi, fw.epsa + deps);
16202        jauCr(r1, rbpn);
16203 
16204     /* Solve for nutation matrix. */
16205        rt = jauTr(r2);
16206        double[][] rn = jauRxr(r1, rt);
16207 
16208     /* Obliquity, mean of date. */
16209        double epsa = fw.epsa;
16210 
16211        return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
16212 
16213         }
16214     
16215 
16216     /**
16217     *  Precession-nutation, IAU 2006/2000A models:  a multi-purpose function,
16218     *  supporting classical (equinox-based) use directly and CIO-based use
16219     *  indirectly.
16220     *
16221     *<p>This function is derived from the International Astronomical Union's
16222     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16223     *
16224     *<p>Status:  support function.
16225     *
16226     *<!-- Given: -->
16227     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16228     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16229     *
16230     *<!-- Returned: -->
16231     *     @return dpsi,deps     double            <u>returned</u> nutation (Note 2)
16232     *            epsa          double            <u>returned</u> mean obliquity (Note 3)
16233     *            rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
16234     *            rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
16235     *            rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
16236     *            rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
16237     *            rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16238     *
16239     * <p>Notes:
16240     * <ol>
16241     *
16242     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
16243     *      convenient way between the two arguments.  For example,
16244     *      JD(TT)=2450123.7 could be expressed in any of these ways,
16245     *      among others:
16246     *<pre>
16247     *             date1          date2
16248     *
16249     *          2450123.7           0.0       (JD method)
16250     *          2451545.0       -1421.3       (J2000 method)
16251     *          2400000.5       50123.2       (MJD method)
16252     *          2450123.5           0.2       (date &amp; time method)
16253     *</pre>
16254     *      The JD method is the most natural and convenient to use in
16255     *      cases where the loss of several decimal digits of resolution
16256     *      is acceptable.  The J2000 method is best matched to the way
16257     *      the argument is handled internally and will deliver the
16258     *      optimum resolution.  The MJD method and the date &amp; time methods
16259     *      are both good compromises between resolution and convenience.
16260     *
16261     * <li>  The nutation components (luni-solar + planetary, IAU 2000A) in
16262     *      longitude and obliquity are in radians and with respect to the
16263     *      equinox and ecliptic of date.  Free core nutation is omitted;
16264     *      for the utmost accuracy, use the jauPn06 function, where the
16265     *      nutation components are caller-specified.
16266     *
16267     * <li>  The mean obliquity is consistent with the IAU 2006 precession.
16268     *
16269     * <li>  The matrix rb transforms vectors from GCRS to mean J2000.0 by
16270     *      applying frame bias.
16271     *
16272     * <li>  The matrix rp transforms vectors from mean J2000.0 to mean of
16273     *      date by applying precession.
16274     *
16275     * <li>  The matrix rbp transforms vectors from GCRS to mean of date by
16276     *      applying frame bias then precession.  It is the product rp x rb.
16277     *
16278     * <li>  The matrix rn transforms vectors from mean of date to true of
16279     *      date by applying the nutation (luni-solar + planetary).
16280     *
16281     * <li>  The matrix rbpn transforms vectors from GCRS to true of date
16282     *      (CIP/equinox).  It is the product rn x rbp, applying frame bias,
16283     *      precession and nutation in that order.
16284     *
16285     * <li>  The X,Y,Z coordinates of the IAU 2006/2000A Celestial
16286     *      Intermediate Pole are elements (1,1-3) of the matrix rbpn.
16287     *
16288     *  <li> It is permissible to re-use the same array in the returned
16289     *      arguments.  The arrays are filled in the stated order.
16290     *</ol>
16291     *<p>Called:<ul>
16292     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16293     *     <li>{@link #jauPn06} bias/precession/nutation results, IAU 2006
16294     * </ul>
16295     *<p>Reference:
16296     *
16297     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16298     *
16299     *@version 2009 December 18
16300     *
16301     *  @since Release 20101201
16302     *
16303     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16304     */
16305     public static PrecessionNutation jauPn06a(double date1, double date2)
16306     {
16307     /* Nutation. */
16308        NutationTerms nut = jauNut06a(date1, date2);
16309 
16310     /* Remaining results. */
16311        return jauPn06(date1, date2, nut.dpsi, nut.deps);
16312 
16313         }
16314     
16315 
16316     /**
16317     *  Form the matrix of precession-nutation for a given date (including
16318     *  frame bias), equinox-based, IAU 2000A model.
16319     *
16320     *<p>This function is derived from the International Astronomical Union's
16321     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16322     *
16323     *<p>Status:  support function.
16324     *
16325     *<!-- Given: -->
16326     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16327     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16328     *
16329     *<!-- Returned: -->
16330     *     @return rbpn          double[3][3]      <u>returned</u> classical NPB matrix (Note 2)
16331     *
16332     * <p>Notes:
16333     * <ol>
16334     *
16335     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16336     *     convenient way between the two arguments.  For example,
16337     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16338     *     among others:
16339     *<pre>
16340     *            date1          date2
16341     *
16342     *         2450123.7           0.0       (JD method)
16343     *         2451545.0       -1421.3       (J2000 method)
16344     *         2400000.5       50123.2       (MJD method)
16345     *         2450123.5           0.2       (date &amp; time method)
16346     *</pre>
16347     *     The JD method is the most natural and convenient to use in
16348     *     cases where the loss of several decimal digits of resolution
16349     *     is acceptable.  The J2000 method is best matched to the way
16350     *     the argument is handled internally and will deliver the
16351     *     optimum resolution.  The MJD method and the date &amp; time methods
16352     *     are both good compromises between resolution and convenience.
16353     *
16354     * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16355     *     the p-vector V(date) is with respect to the true equatorial triad
16356     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16357     *     the Geocentric Celestial Reference System (IAU, 2000).
16358     *
16359     * <li> A faster, but slightly less accurate result (about 1 mas), can be
16360     *     obtained by using instead the jauPnm00b function.
16361     *</ol>
16362     *<p>Called:<ul>
16363     *     <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
16364     * </ul>
16365     *<p>Reference:
16366     *
16367     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
16368     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
16369     *     (2000)
16370     *
16371     *@version 2009 December 21
16372     *
16373     *  @since Release 20101201
16374     *
16375     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16376     */
16377     public static double[][] jauPnm00a(double date1, double date2)
16378     {
16379 
16380     /* Obtain the required matrix (discarding other results). */
16381         PrecessionNutation pn = jauPn00a(date1, date2);
16382         return pn.rbpn;
16383 
16384     }
16385 
16386 
16387     /**
16388     *  Form the matrix of precession-nutation for a given date (including
16389     *  frame bias), equinox-based, IAU 2000B model.
16390     *
16391     *<p>This function is derived from the International Astronomical Union's
16392     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16393     *
16394     *<p>Status:  support function.
16395     *
16396     *<!-- Given: -->
16397     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16398     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16399     *
16400     *<!-- Returned: -->
16401     *     @return rbpn         double[3][3]   <u>returned</u> bias-precession-nutation matrix (Note 2)
16402     *
16403     * <p>Notes:
16404     * <ol>
16405     *
16406     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16407     *     convenient way between the two arguments.  For example,
16408     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16409     *     among others:
16410     *<pre>
16411     *            date1          date2
16412     *
16413     *         2450123.7           0.0       (JD method)
16414     *         2451545.0       -1421.3       (J2000 method)
16415     *         2400000.5       50123.2       (MJD method)
16416     *         2450123.5           0.2       (date &amp; time method)
16417     *</pre>
16418     *     The JD method is the most natural and convenient to use in
16419     *     cases where the loss of several decimal digits of resolution
16420     *     is acceptable.  The J2000 method is best matched to the way
16421     *     the argument is handled internally and will deliver the
16422     *     optimum resolution.  The MJD method and the date &amp; time methods
16423     *     are both good compromises between resolution and convenience.
16424     *
16425     * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16426     *     the p-vector V(date) is with respect to the true equatorial triad
16427     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16428     *     the Geocentric Celestial Reference System (IAU, 2000).
16429     *
16430     * <li> The present function is faster, but slightly less accurate (about
16431     *     1 mas), than the jauPnm00a function.
16432     *</ol>
16433     *<p>Called:<ul>
16434     *     <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
16435     * </ul>
16436     *<p>Reference:
16437     *
16438     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
16439     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
16440     *     (2000)
16441     *
16442     *@version 2009 December 21
16443     *
16444     *  @since Release 20101201
16445     *
16446     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16447     */
16448     public static double[][] jauPnm00b(double date1, double date2)
16449     {
16450 
16451     /* Obtain the required matrix (discarding other results). */
16452        PrecessionNutation pn = jauPn00b(date1, date2);
16453 
16454        return pn.rbpn;
16455 
16456         }
16457     
16458 
16459     /**
16460     *  Form the matrix of precession-nutation for a given date (including
16461     *  frame bias), IAU 2006 precession and IAU 2000A nutation models.
16462     *
16463     *<p>This function is derived from the International Astronomical Union's
16464     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16465     *
16466     *<p>Status:  support function.
16467     *
16468     *<!-- Given: -->
16469     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16470     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16471     *
16472     *<!-- Returned: -->
16473     *     @return rnpb         double[3][3]   <u>returned</u> bias-precession-nutation matrix (Note 2)
16474     *
16475     * <p>Notes:
16476     * <ol>
16477     *
16478     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16479     *     convenient way between the two arguments.  For example,
16480     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16481     *     among others:
16482     *<pre>
16483     *            date1          date2
16484     *
16485     *         2450123.7           0.0       (JD method)
16486     *         2451545.0       -1421.3       (J2000 method)
16487     *         2400000.5       50123.2       (MJD method)
16488     *         2450123.5           0.2       (date &amp; time method)
16489     *</pre>
16490     *     The JD method is the most natural and convenient to use in
16491     *     cases where the loss of several decimal digits of resolution
16492     *     is acceptable.  The J2000 method is best matched to the way
16493     *     the argument is handled internally and will deliver the
16494     *     optimum resolution.  The MJD method and the date &amp; time methods
16495     *     are both good compromises between resolution and convenience.
16496     *
16497     * <li> The matrix operates in the sense V(date) = rnpb * V(GCRS), where
16498     *     the p-vector V(date) is with respect to the true equatorial triad
16499     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16500     *     the Geocentric Celestial Reference System (IAU, 2000).
16501     *</ol>
16502     *<p>Called:<ul>
16503     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16504     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16505     *     <li>{@link #jauFw2m} F-W angles to r-matrix
16506     * </ul>
16507     *<p>Reference:
16508     *
16509     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855.
16510     *
16511     *@version 2009 December 21
16512     *
16513     *  @since Release 20101201
16514     *
16515     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16516     */
16517     public static double[][] jauPnm06a(double date1, double date2)
16518     {
16519 
16520     /* Fukushima-Williams angles for frame bias and precession. */
16521        FWPrecessionAngles fw = jauPfw06(date1, date2);
16522 
16523     /* Nutation components. */
16524        NutationTerms nut = jauNut06a(date1, date2);
16525 
16526     /* Equinox based nutation x precession x bias matrix. */
16527        double[][] rnpb = jauFw2m(fw.gamb, fw.phib, fw.psib + nut.dpsi, fw.epsa + nut.deps);
16528 
16529        return rnpb;
16530 
16531         }
16532     
16533 
16534     /**
16535     *  Form the matrix of precession/nutation for a given date, IAU 1976
16536     *  precession model, IAU 1980 nutation model.
16537     *
16538     *<p>This function is derived from the International Astronomical Union's
16539     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16540     *
16541     *<p>Status:  support function.
16542     *
16543     *<!-- Given: -->
16544     *     @param date1 double          TDB date (Note 1)
16545     *     @param date2 double          TDB date (Note 1) 
16546     *
16547     *<!-- Returned: -->
16548     *     @return rmatpn          double[3][3]     <u>returned</u> combined precession/nutation matrix
16549     *
16550     * <p>Notes:
16551     * <ol>
16552     *
16553     * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
16554     *     convenient way between the two arguments.  For example,
16555     *     JD(TDB)=2450123.7 could be expressed in any of these ways,
16556     *     among others:
16557     *<pre>
16558     *            date1          date2
16559     *
16560     *         2450123.7           0.0       (JD method)
16561     *         2451545.0       -1421.3       (J2000 method)
16562     *         2400000.5       50123.2       (MJD method)
16563     *         2450123.5           0.2       (date &amp; time method)
16564     *</pre>
16565     *     The JD method is the most natural and convenient to use in
16566     *     cases where the loss of several decimal digits of resolution
16567     *     is acceptable.  The J2000 method is best matched to the way
16568     *     the argument is handled internally and will deliver the
16569     *     optimum resolution.  The MJD method and the date &amp; time methods
16570     *     are both good compromises between resolution and convenience.
16571     *
16572     * <li> The matrix operates in the sense V(date) = rmatpn * V(J2000),
16573     *     where the p-vector V(date) is with respect to the true equatorial
16574     *     triad of date date1+date2 and the p-vector V(J2000) is with
16575     *     respect to the mean equatorial triad of epoch J2000.0.
16576     *</ol>
16577     *<p>Called:<ul>
16578     *     <li>{@link #jauPmat76} precession matrix, IAU 1976
16579     *     <li>{@link #jauNutm80} nutation matrix, IAU 1980
16580     *     <li>{@link #jauRxr} product of two r-matrices
16581     * </ul>
16582     *<p>Reference:
16583     *
16584     *     <p>Explanatory Supplement to the Astronomical Almanac,
16585     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
16586     *     Section 3.3 (p145).
16587     *
16588     *@version 2010 January 23
16589     *
16590     *  @since Release 20101201
16591     *
16592     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16593     */
16594     public static double[][] jauPnm80(double date1, double date2)
16595     {
16596        double rmatp[][] = new double[3][3], rmatn[][] = new double[3][3];
16597 
16598 
16599     /* Precession matrix, J2000.0 to date. */
16600        rmatp = jauPmat76(date1, date2 );
16601 
16602     /* Nutation matrix. */
16603        rmatn = jauNutm80(date1, date2);
16604 
16605     /* Combine the matrices:  PN = N x P. */
16606        double[][] rmatpn = jauRxr(rmatn, rmatp);
16607 
16608        return rmatpn;
16609 
16610         }
16611     
16612 
16613     /**
16614     *  Form the matrix of polar motion for a given date, IAU 2000.
16615     *
16616     *<p>This function is derived from the International Astronomical Union's
16617     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16618     *
16619     *<p>Status:  support function.
16620     *
16621     *<!-- Given: -->
16622     *     @param xp double     coordinates of the pole (radians, Note 1)
16623     *     @param yp double     coordinates of the pole (radians, Note 1) 
16624     *     @param sp        double     the TIO locator s' (radians, Note 2)
16625     *
16626     *<!-- Returned: -->
16627     *     @return     double[3][3]     <u>returned</u> polar-motion matrix (Note 3)
16628     *
16629     * <p>Notes:
16630     * <ol>
16631     *
16632     * <li> The arguments xp and yp are the coordinates (in radians) of the
16633     *     Celestial Intermediate Pole with respect to the International
16634     *     Terrestrial Reference System (see IERS Conventions 2003),
16635     *     measured along the meridians to 0 and 90 deg west respectively.
16636     *
16637     * <li> The argument sp is the TIO locator s', in radians, which
16638     *     positions the Terrestrial Intermediate Origin on the equator.  It
16639     *     is obtained from polar motion observations by numerical
16640     *     integration, and so is in essence unpredictable.  However, it is
16641     *     dominated by a secular drift of about 47 microarcseconds per
16642     *     century, and so can be taken into account by using s' = -47*t,
16643     *     where t is centuries since J2000.0.  The function jauSp00
16644     *     implements this approximation.
16645     *
16646     * <li> The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning
16647     *     that it is the final rotation when computing the pointing
16648     *     direction to a celestial source.
16649     *</ol>
16650     *<p>Called:<ul>
16651     *     <li>{@link #jauIr} initialize r-matrix to identity
16652     *     <li>{@link #jauRz} rotate around Z-axis
16653     *     <li>{@link #jauRy} rotate around Y-axis
16654     *     <li>{@link #jauRx} rotate around X-axis
16655     * </ul>
16656     *<p>Reference:
16657     *
16658     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
16659     *     IERS Technical Note No. 32, BKG (2004)
16660     *
16661     *@version 2009 December 17
16662     *
16663     *  @since Release 20101201
16664     *
16665     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16666     */
16667     public static double[][] jauPom00(double xp, double yp, double sp)
16668     {
16669 
16670     /* Construct the matrix. */
16671        double rpom[][] = new double[3][3];
16672        jauIr(rpom);
16673        jauRz(sp, rpom);
16674        jauRy(-xp, rpom);
16675        jauRx(-yp, rpom);
16676 
16677        return rpom;
16678 
16679         }
16680     
16681 
16682     /**
16683     *  P-vector addition.
16684     *
16685     *<p>This function is derived from the International Astronomical Union's
16686     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16687     *
16688     *<p>Status:  vector/matrix support function.
16689     *
16690     *<!-- Given: -->
16691     *     @param a         double[3]       first p-vector
16692     *     @param b         double[3]       second p-vector
16693     *
16694     *<!-- Returned: -->
16695     *     @return apb       double[3]        <u>returned</u> a + b
16696     *
16697     *  Note:
16698     *     It is permissible to re-use the same array for any of the
16699     *     arguments.
16700     *
16701     *@version 2008 November 18
16702     *
16703     *  @since Release 20101201
16704     *
16705     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16706     */
16707     public static double[] jauPpp(double a[] , double b[] )
16708     {
16709        double apb[] = new double[3]; 
16710        apb[0] = a[0] + b[0];
16711        apb[1] = a[1] + b[1];
16712        apb[2] = a[2] + b[2];
16713 
16714        return apb;
16715 
16716      }
16717     
16718 
16719     /**
16720     *  P-vector plus scaled p-vector.
16721     *
16722     *<p>This function is derived from the International Astronomical Union's
16723     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16724     *
16725     *<p>Status:  vector/matrix support function.
16726     *
16727     *<!-- Given: -->
16728     *     @param a       double[3]      first p-vector
16729     *     @param s       double         scalar (multiplier for b)
16730     *     @param b       double[3]      second p-vector
16731     *
16732     *<!-- Returned: -->
16733     *     @return apsb    double[3]       <u>returned</u> a + s*b
16734     *
16735     *  Note:
16736     *     It is permissible for any of a, b and apsb to be the same array.
16737     *
16738     *<p>Called:<ul>
16739     *     <li>{@link #jauSxp} multiply p-vector by scalar
16740     *     <li>{@link #jauPpp} p-vector plus p-vector
16741     * </ul>
16742     *@version 2008 November 18
16743     *
16744     *  @since Release 20101201
16745     *
16746     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16747     */
16748     static double[] jauPpsp(double a[] , double s, double b[]  )
16749     {
16750        double sb[] = new double[3], apsb[];
16751 
16752 
16753     /* s*b. */
16754        sb = jauSxp(s,b);
16755 
16756     /* a + s*b. */
16757        apsb = jauPpp(a, sb);
16758 
16759        return apsb;
16760 
16761         }
16762     
16763     /**
16764      * Precession correction terms.
16765      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16766      * 
16767      * @since AIDA Stage 1
16768      */
16769     public static class PrecessionDeltaTerms {
16770         /**  precession correction in longitude  */
16771         public double dpsipr;
16772         /**  precession correction in obliquity */
16773         public double depspr;
16774         public PrecessionDeltaTerms(double dpsipr, double depspr) {
16775             this.dpsipr = dpsipr;
16776             this.depspr = depspr;
16777         }
16778     }
16779 
16780     /**
16781     *  Precession-rate part of the IAU 2000 precession-nutation models
16782     *  (part of MHB2000).
16783     *
16784     *<p>This function is derived from the International Astronomical Union's
16785     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16786     *
16787     *<p>Status:  canonical model.
16788     *
16789     *<!-- Given: -->
16790     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16791     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16792     *
16793     *<!-- Returned: -->
16794     *     @param dpsipr double    <u>returned</u> precession corrections (Notes 2,3)
16795     *     @param depspr double    <u>returned</u> precession corrections (Notes 2,3) 
16796     *
16797     * <p>Notes:
16798     * <ol>
16799     *
16800     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16801     *     convenient way between the two arguments.  For example,
16802     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16803     *     among others:
16804     *<pre>
16805     *            date1          date2
16806     *
16807     *         2450123.7           0.0       (JD method)
16808     *         2451545.0       -1421.3       (J2000 method)
16809     *         2400000.5       50123.2       (MJD method)
16810     *         2450123.5           0.2       (date &amp; time method)
16811     *</pre>
16812     *     The JD method is the most natural and convenient to use in
16813     *     cases where the loss of several decimal digits of resolution
16814     *     is acceptable.  The J2000 method is best matched to the way
16815     *     the argument is handled internally and will deliver the
16816     *     optimum resolution.  The MJD method and the date &amp; time methods
16817     *     are both good compromises between resolution and convenience.
16818     *
16819     * <li> The precession adjustments are expressed as "nutation
16820     *     components", corrections in longitude and obliquity with respect
16821     *     to the J2000.0 equinox and ecliptic.
16822     *
16823     * <li> Although the precession adjustments are stated to be with respect
16824     *     to Lieske et al. (1977), the MHB2000 model does not specify which
16825     *     set of Euler angles are to be used and how the adjustments are to
16826     *     be applied.  The most literal and straightforward procedure is to
16827     *     adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and
16828     *     to add dpsipr to psi_A and depspr to both omega_A and eps_A.
16829     *
16830     * <li> This is an implementation of one aspect of the IAU 2000A nutation
16831     *     model, formally adopted by the IAU General Assembly in 2000,
16832     *     namely MHB2000 (Mathews et al. 2002).
16833     *
16834     *<p>References:
16835     *
16836     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B., "Expressions
16837     *     for the precession quantities based upon the IAU (1976) System of
16838     *     Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977)
16839     *
16840     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
16841     *     and precession   New nutation series for nonrigid Earth and
16842     *     insights into the Earth's interior", J.Geophys.Res., 107, B4,
16843     *     2002.  The MHB2000 code itself was obtained on 9th September 2002
16844     *     from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
16845     *
16846     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
16847     *     Resolutions", in IERS Workshop 5.1 (2002).
16848     *
16849     *@version 2009 December 17
16850     *
16851     *  @since Release 20101201
16852     *
16853     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16854     */
16855     static PrecessionDeltaTerms jauPr00(double date1, double date2)
16856     {
16857        double t;
16858 
16859     /* Precession and obliquity corrections (radians per century) */
16860        final double PRECOR = -0.29965 * DAS2R,
16861                            OBLCOR = -0.02524 * DAS2R;
16862 
16863 
16864     /* Interval between fundamental epoch J2000.0 and given date (JC). */
16865        t = ((date1 - DJ00) + date2) / DJC;
16866 
16867     /* Precession rate contributions with respect to IAU 1976/80. */
16868        double dpsipr = PRECOR * t;
16869        double depspr = OBLCOR * t;
16870 
16871        return new PrecessionDeltaTerms(dpsipr, depspr);
16872 
16873         }
16874     
16875     /**
16876      * Euler Angles.
16877      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16878      * 
16879      * @since AIDA Stage 1
16880      */
16881     public static class EulerAngles {
16882         /** 1st rotation: radians cw around z */
16883         public double zeta;
16884         /** 3rd rotation: radians cw around z */
16885         public double z;
16886         /** 2nd rotation: radians ccw around y */
16887         public double theta;
16888         public EulerAngles(double zeta, double z, double theta){
16889             this.zeta = zeta;
16890             this.z = z;
16891             this.theta = theta;
16892         }
16893     }
16894                    
16895     /**
16896     *  IAU 1976 precession model.
16897     *
16898     *  This function forms the three Euler angles which implement general
16899     *  precession between two epochs, using the IAU 1976 model (as for
16900     *  the FK5 catalog).
16901     *
16902     *<p>This function is derived from the International Astronomical Union's
16903     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16904     *
16905     *<p>Status:  canonical model.
16906     *
16907     *<!-- Given: -->
16908     *     @param ep01 double     TDB starting epoch (Note 1)
16909     *     @param ep02 double     TDB starting epoch (Note 1) 
16910     *     @param ep11 double     TDB ending epoch (Note 1)
16911     *     @param ep12 double     TDB ending epoch (Note 1) 
16912     *
16913     *<!-- Returned: -->
16914     *     @param zeta         double      <u>returned</u> 1st rotation: radians cw around z
16915     *     @param z            double      <u>returned</u> 3rd rotation: radians cw around z
16916     *     @param theta        double      <u>returned</u> 2nd rotation: radians ccw around y
16917     *
16918     * <p>Notes:
16919     * <ol>
16920     *
16921     * <li> The epochs ep01+ep02 and ep11+ep12 are Julian Dates, apportioned
16922     *     in any convenient way between the arguments epn1 and epn2.  For
16923     *     example, JD(TDB)=2450123.7 could be expressed in any of these
16924     *     ways, among others:
16925     *
16926     *             epn1          epn2
16927     *
16928     *         2450123.7           0.0       (JD method)
16929     *         2451545.0       -1421.3       (J2000 method)
16930     *         2400000.5       50123.2       (MJD method)
16931     *         2450123.5           0.2       (date &amp; time method)
16932     *</pre>
16933     *     The JD method is the most natural and convenient to use in cases
16934     *     where the loss of several decimal digits of resolution is
16935     *     acceptable.  The J2000 method is best matched to the way the
16936     *     argument is handled internally and will deliver the optimum
16937     *     optimum resolution.  The MJD method and the date &amp; time methods
16938     *     are both good compromises between resolution and convenience.
16939     *     The two epochs may be expressed using different methods, but at
16940     *     the risk of losing some resolution.
16941     *
16942     * <li> The accumulated precession angles zeta, z, theta are expressed
16943     *     through canonical polynomials which are valid only for a limited
16944     *     time span.  In addition, the IAU 1976 precession rate is known to
16945     *     be imperfect.  The absolute accuracy of the present formulation
16946     *     is better than 0.1 arcsec from 1960AD to 2040AD, better than
16947     *     1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for
16948     *     the whole of the period 500BC to 3000AD.  The errors exceed
16949     *     10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec
16950     *     outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to
16951     *     8200AD.
16952     *
16953     * <li> The three angles are returned in the conventional order, which
16954     *     is not the same as the order of the corresponding Euler
16955     *     rotations.  The precession matrix is
16956     *     R_3(-z) x R_2(+theta) x R_3(-zeta).
16957     *
16958     *<p>Reference:
16959     *
16960     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations
16961     *     (6) &amp; (7), p283.
16962     *
16963     *@version 2009 December 17
16964     *
16965     *  @since Release 20101201
16966     *
16967     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16968     */
16969     static EulerAngles jauPrec76(double ep01, double ep02, double ep11, double ep12)
16970     {
16971        double t0, t, tas2r, w;
16972 
16973 
16974     /* Interval between fundamental epoch J2000.0 and start epoch (JC). */
16975        t0 = ((ep01 - DJ00) + ep02) / DJC;
16976 
16977     /* Interval over which precession required (JC). */
16978        t = ((ep11 - ep01) + (ep12 - ep02)) / DJC;
16979 
16980     /* Euler angles. */
16981        tas2r = t * DAS2R;
16982        w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0;
16983 
16984        double zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r;
16985 
16986        double z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r;
16987 
16988        double theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0)
16989               + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r;
16990 
16991        return new EulerAngles(zeta, z, theta);
16992 
16993         }
16994     
16995 
16996     /**
16997     *  Discard velocity component of a pv-vector.
16998     *
16999     *<p>This function is derived from the International Astronomical Union's
17000     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17001     *
17002     *<p>Status:  vector/matrix support function.
17003     *
17004     *<!-- Given: -->
17005     *     @param pv       double[2][3]      pv-vector
17006     *
17007     *<!-- Returned: -->
17008     *     @return p        double[3]          <u>returned</u> p-vector
17009     *
17010     *<p>Called:<ul>
17011     *     <li>{@link #jauCp} copy p-vector
17012     * </ul>
17013     *@version 2008 May 11
17014     *
17015     *  @since Release 20101201
17016     *
17017     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17018     */
17019     public static double[] jauPv2p(double pv[][] )
17020     {
17021        double p[] = new double[3];
17022        jauCp(pv[0], p);
17023 
17024        return p;
17025 
17026         }
17027     
17028 
17029     /**
17030      * A position and velocity expressed in spherical polar coordinates.
17031      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17032      * 
17033      * @since AIDA Stage 1
17034      */
17035     public static class SphericalPositionVelocity {
17036         public SphericalPosition pos;
17037         public SphericalPosition vel;
17038         public SphericalPositionVelocity( double theta, double phi, double r,
17039                 double td, double pd, double rd) {
17040             pos = new SphericalPosition(theta, phi, r);
17041             vel = new SphericalPosition(td,pd,rd);
17042         }
17043     }
17044     /**
17045     *  Convert position/velocity from Cartesian to spherical coordinates.
17046     *
17047     *<p>This function is derived from the International Astronomical Union's
17048     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17049     *
17050     *<p>Status:  vector/matrix support function.
17051     *
17052     *<!-- Given: -->
17053     *     @param pv        double[2][3]   pv-vector
17054     *
17055     *<!-- Returned: -->
17056     *     @return theta     double          <u>returned</u> longitude angle (radians)
17057     *             phi       double          <u>returned</u> latitude angle (radians)
17058     *             r         double          <u>returned</u> radial distance
17059     *             td        double          <u>returned</u> rate of change of theta
17060     *             pd        double          <u>returned</u> rate of change of phi
17061     *             rd        double          <u>returned</u> rate of change of r
17062     *
17063     * <p>Notes:
17064     * <ol>
17065     *
17066     * <li> If the position part of pv is null, theta, phi, td and pd
17067     *     are indeterminate.  This is handled by extrapolating the
17068     *     position through unit time by using the velocity part of
17069     *     pv.  This moves the origin without changing the direction
17070     *     of the velocity component.  If the position and velocity
17071     *     components of pv are both null, zeroes are returned for all
17072     *     six results.
17073     *
17074     * <li> If the position is a pole, theta, td and pd are indeterminate.
17075     *     In such cases zeroes are returned for all three.
17076     *</ol>
17077     *@version 2008 October 28
17078     *
17079     *  @since Release 20101201
17080     *
17081     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17082     */
17083     public static SphericalPositionVelocity jauPv2s(double pv[][])
17084     {
17085        double x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp;
17086        double theta, phi, r, td, pd, rd;
17087 
17088     /* Components of position/velocity vector. */
17089        x  = pv[0][0];
17090        y  = pv[0][1];
17091        z  = pv[0][2];
17092        xd = pv[1][0];
17093        yd = pv[1][1];
17094        zd = pv[1][2];
17095 
17096     /* Component of r in XY plane squared. */
17097        rxy2 = x*x + y*y;
17098 
17099     /* Modulus squared. */
17100        r2 = rxy2 + z*z;
17101 
17102     /* Modulus. */
17103        rtrue = sqrt(r2);
17104 
17105     /* If null vector, move the origin along the direction of movement. */
17106        rw = rtrue;
17107        if (rtrue == 0.0) {
17108            x = xd;
17109            y = yd;
17110            z = zd;
17111            rxy2 = x*x + y*y;
17112            r2 = rxy2 + z*z;
17113            rw = sqrt(r2);
17114        }
17115 
17116     /* Position and velocity in spherical coordinates. */
17117        rxy = sqrt(rxy2);
17118        xyp = x*xd + y*yd;
17119        if (rxy2 != 0.0) {
17120            theta = atan2(y, x);
17121            phi = atan2(z, rxy);
17122            td = (x*yd - y*xd) / rxy2;
17123            pd = (zd*rxy2 - z*xyp) / (r2*rxy);
17124        } else {
17125            theta = 0.0;
17126            phi = (z != 0.0) ? atan2(z, rxy) : 0.0;
17127            td = 0.0;
17128            pd = 0.0;
17129        }
17130        r = rtrue;
17131        rd = (rw != 0.0) ? (xyp + z*zd) / rw : 0.0;
17132 
17133        return new SphericalPositionVelocity(theta, phi, r, td, pd, rd);
17134 
17135         }
17136     
17137 
17138     /**
17139     *  Inner (=scalar=dot) product of two pv-vectors.
17140     *
17141     *<p>This function is derived from the International Astronomical Union's
17142     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17143     *
17144     *<p>Status:  vector/matrix support function.
17145     *
17146     *<!-- Given: -->
17147     *     @param a         double[2][3]       first pv-vector
17148     *     @param b         double[2][3]       second pv-vector
17149     *
17150     *<!-- Returned: -->
17151     *     @return adb       double[2]           <u>returned</u> a . b (see note)
17152     *
17153     *  Note:
17154     *
17155     *     If the position and velocity components of the two pv-vectors are
17156     *     ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of
17157     *     numbers ( ap . bp , ap . bv + av . bp ).  The two numbers are the
17158     *     dot-product of the two p-vectors and its derivative.
17159     *
17160     *<p>Called:<ul>
17161     *     <li>{@link #jauPdp} scalar product of two p-vectors
17162     * </ul>
17163     *@version 2008 May 22
17164     *
17165     *  @since Release 20101201
17166     *
17167     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17168     */
17169     public static double[] jauPvdpv(double a[][], double b[][] )
17170     {
17171        double adbd, addb, adb[] = new double[2];
17172 
17173 
17174     /* a . b = constant part of result. */
17175        adb[0] = jauPdp(a[0], b[0]);
17176 
17177     /* a . bdot */
17178        adbd = jauPdp(a[0], b[1]);
17179 
17180     /* adot . b */
17181        addb = jauPdp(a[1], b[0]);
17182 
17183     /* Velocity part of result. */
17184        adb[1] = adbd + addb;
17185 
17186        return adb;
17187 
17188         }
17189     
17190 
17191     /**
17192      * Modulus of pv-vector.
17193      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17194      * 
17195      * @since AIDA Stage 1
17196      */
17197     public static class PVModulus{
17198         public double r;
17199         public double s;
17200         public PVModulus( double r, double s){
17201             this.r = r;
17202             this.s = s;
17203         }
17204     }
17205     /**
17206     *  Modulus of pv-vector.
17207     *
17208     *<p>This function is derived from the International Astronomical Union's
17209     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17210     *
17211     *<p>Status:  vector/matrix support function.
17212     *
17213     *<!-- Given: -->
17214     *     @param pv      double[2][3]    pv-vector
17215     *
17216     *<!-- Returned: -->
17217     *     @return           modulus of position component,
17218     *                      modulus of velocity component
17219     *
17220     *<p>Called:<ul>
17221     *     <li>{@link #jauPm} modulus of p-vector
17222     * </ul>
17223     *@version 2008 May 22
17224     *
17225     *  @since Release 20101201
17226     *
17227     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17228     */
17229     public static PVModulus jauPvm(double pv[][])
17230     {
17231     /* Distance. */
17232        double r = jauPm(pv[0]);
17233 
17234     /* Speed. */
17235        double s = jauPm(pv[1]);
17236 
17237        return new PVModulus(r, s);
17238 
17239         }
17240     
17241 
17242     /**
17243     *  Subtract one pv-vector from another.
17244     *
17245     *<p>This function is derived from the International Astronomical Union's
17246     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17247     *
17248     *<p>Status:  vector/matrix support function.
17249     *
17250     *<!-- Given: -->
17251     *     @param a        double[2][3]       first pv-vector
17252     *     @param b        double[2][3]       second pv-vector
17253     *
17254     *<!-- Returned: -->
17255     *     @return      double[2][3]        <u>returned</u> a - b
17256     *
17257     *  Note:
17258     *     It is permissible to re-use the same array for any of the
17259     *     arguments.
17260     *
17261     *<p>Called:<ul>
17262     *     <li>{@link #jauPmp} p-vector minus p-vector
17263     * </ul>
17264     *@version 2008 November 18
17265     *
17266     *  @since Release 20101201
17267     *
17268     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17269     */
17270     public static double[][] jauPvmpv(double a[][], double b[][])
17271     {
17272        double amb[][] = new double[2][3];
17273        amb[0] = jauPmp(a[0], b[0]);
17274        amb[1] = jauPmp(a[1], b[1]);
17275 
17276        return amb;
17277 
17278         }
17279     
17280 
17281     /**
17282     *  Add one pv-vector to another.
17283     *
17284     *<p>This function is derived from the International Astronomical Union's
17285     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17286     *
17287     *<p>Status:  vector/matrix support function.
17288     *
17289     *<!-- Given: -->
17290     *     @param a         double[2][3]       first pv-vector
17291     *     @param b         double[2][3]       second pv-vector
17292     *
17293     *<!-- Returned: -->
17294     *     @return apb       double[2][3]        <u>returned</u> a + b
17295     *
17296     *  Note:
17297     *     It is permissible to re-use the same array for any of the
17298     *     arguments.
17299     *
17300     *<p>Called:<ul>
17301     *     <li>{@link #jauPpp} p-vector plus p-vector
17302     * </ul>
17303     *@version 2008 November 18
17304     *
17305     *  @since Release 20101201
17306     *
17307     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17308     */
17309     public static double[][] jauPvppv(double a[][], double b[][])
17310     {
17311        double apb[][] = new double[2][3];
17312        apb[0] = jauPpp(a[0], b[0]);
17313        apb[1] = jauPpp(a[1], b[1]);
17314 
17315        return apb;
17316 
17317         }
17318     
17319 
17320     /**
17321      * Typical catalogue coordinates. i.e. Position, proper motion, parallax and radial velocity.
17322      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17323      * 
17324      * @since AIDA Stage 1
17325      */
17326     public static class CatalogCoords {
17327         /** position (radians) */
17328         public SphericalCoordinate pos;
17329         /** proper motion (radians/year)*/
17330         public SphericalCoordinate pm;
17331         /** parallax (arcsec) */
17332         public double px;
17333         /** radial velocity (km/s, positive = receding) */
17334         public double rv;
17335         
17336         public CatalogCoords(double ra, double dec,
17337                 double pmr, double pmd, double px, double rv) {
17338             this.pos = new SphericalCoordinate(ra, dec);
17339             this.pm = new SphericalCoordinate(pmr, pmd);
17340             this.px = px;
17341             this.rv = rv;
17342         }
17343     }
17344     /**
17345     *  Convert star position+velocity vector to catalog coordinates.
17346     *
17347     *<p>This function is derived from the International Astronomical Union's
17348     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17349     *
17350     *<p>Status:  support function.
17351     *
17352     *  Given (Note 1):
17353     *     pv     double[2][3]   pv-vector (au, au/day)
17354     *
17355     *  Returned (Note 2):
17356     *     ra     double         right ascension (radians)
17357     *     dec    double         declination (radians)
17358     *     pmr    double         RA proper motion (radians/year)
17359     *     pmd    double         Dec proper motion (radians/year)
17360     *     px     double         parallax (arcsec)
17361     *     rv     double         radial velocity (km/s, positive = receding)
17362     *
17363     * <!-- Returned (function value): -->
17364     *  @return int            status:
17365     *                              0 = OK
17366     *                             -1 = superluminal speed (Note 5)
17367     *                             -2 = null position vector
17368     *
17369     * <p>Notes:
17370     * <ol>
17371     *
17372     * <li> The specified pv-vector is the coordinate direction (and its rate
17373     *     of change) for the date at which the light leaving the star
17374     *     reached the solar-system barycenter.
17375     *
17376     * <li> The star data returned by this function are "observables" for an
17377     *     imaginary observer at the solar-system barycenter.  Proper motion
17378     *     and radial velocity are, strictly, in terms of barycentric
17379     *     coordinate time, TCB.  For most practical applications, it is
17380     *     permissible to neglect the distinction between TCB and ordinary
17381     *     "proper" time on Earth (TT/TAI).  The result will, as a rule, be
17382     *     limited by the intrinsic accuracy of the proper-motion and
17383     *     radial-velocity data;  moreover, the supplied pv-vector is likely
17384     *     to be merely an intermediate result (for example generated by the
17385     *     function jauStarpv), so that a change of time unit will cancel
17386     *     out overall.
17387     *
17388     *     In accordance with normal star-catalog conventions, the object's
17389     *     right ascension and declination are freed from the effects of
17390     *     secular aberration.  The frame, which is aligned to the catalog
17391     *     equator and equinox, is Lorentzian and centered on the SSB.
17392     *
17393     *     Summarizing, the specified pv-vector is for most stars almost
17394     *     identical to the result of applying the standard geometrical
17395     *     "space motion" transformation to the catalog data.  The
17396     *     differences, which are the subject of the Stumpff paper cited
17397     *     below, are:
17398     *
17399     *     (i) In stars with significant radial velocity and proper motion,
17400     *     the constantly changing light-time distorts the apparent proper
17401     *     motion.  Note that this is a classical, not a relativistic,
17402     *     effect.
17403     *
17404     *     (ii) The transformation complies with special relativity.
17405     *
17406     * <li> Care is needed with units.  The star coordinates are in radians
17407     *     and the proper motions in radians per Julian year, but the
17408     *     parallax is in arcseconds; the radial velocity is in km/s, but
17409     *     the pv-vector result is in au and au/day.
17410     *
17411     * <li> The proper motions are the rate of change of the right ascension
17412     *     and declination at the catalog epoch and are in radians per Julian
17413     *     year.  The RA proper motion is in terms of coordinate angle, not
17414     *     true angle, and will thus be numerically larger at high
17415     *     declinations.
17416     *
17417     * <li> Straight-line motion at constant speed in the inertial frame is
17418     *     assumed.  If the speed is greater than or equal to the speed of
17419     *     light, the function aborts with an error status.
17420     *
17421     * <li> The inverse transformation is performed by the function jauStarpv.
17422     *</ol>
17423     *<p>Called:<ul>
17424     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
17425     *     <li>{@link #jauPdp} scalar product of two p-vectors
17426     *     <li>{@link #jauSxp} multiply p-vector by scalar
17427     *     <li>{@link #jauPmp} p-vector minus p-vector
17428     *     <li>{@link #jauPm} modulus of p-vector
17429     *     <li>{@link #jauPpp} p-vector plus p-vector
17430     *     <li>{@link #jauPv2s} pv-vector to spherical
17431     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
17432     * </ul>
17433     *<p>Reference:
17434     *
17435     *     Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
17436     *
17437     *@version 2017 May 30
17438     *
17439     *  @since Release 20101201
17440     *
17441     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17442     */
17443     public static CatalogCoords jauPvstar(double pv[][]) throws JSOFAInternalError
17444     {
17445        double x[] = new double[3], vr, ur[] = new double[3], vt, ut[] = new double[3], bett, betr, d, w, del,
17446               usr[] = new double[3], ust[] = new double[3];
17447 
17448 
17449     /* Isolate the radial component of the velocity (au/day, inertial). */
17450        NormalizedVector nv = jauPn(pv[0]);
17451        x = nv.u;
17452        vr = jauPdp(x, pv[1]);
17453        ur = jauSxp(vr,x);
17454 
17455     /* Isolate the transverse component of the velocity (au/day, inertial). */
17456        ut = jauPmp(pv[1], ur);
17457        vt = jauPm(ut);
17458 
17459     /* Special-relativity dimensionless parameters. */
17460        bett = vt / DC;
17461        betr = vr / DC;
17462 
17463     /* The inertial-to-observed correction terms. */
17464        d = 1.0 + betr;
17465        w = betr*betr + bett*bett;
17466        if (d == 0.0 || w > 1) throw new JSOFAInternalError("Superluminal speed", -1);
17467        del = -w / (sqrt(1.0 -w) + 1.0);
17468 
17469     /* Apply relativistic correction factor to radial velocity component. */
17470        w = (betr != 0) ? (betr - del) / (betr * d) : 1.0;
17471        usr = jauSxp(w,ur);
17472 
17473     /* Apply relativistic correction factor to tangential velocity */
17474     /* component.                                                  */
17475        ust = jauSxp(1.0/d, ut);
17476 
17477     /* Combine the two to obtain the observed velocity vector (au/day). */
17478        pv[1] = jauPpp(usr, ust);
17479 
17480     /* Cartesian to spherical. */
17481        SphericalPositionVelocity pvs = jauPv2s(pv);
17482        if (pvs.pos.r == 0.0) throw new JSOFAInternalError("null position vector", -2);
17483 
17484     /* Return RA in range 0 to 2pi. */
17485        double ra = jauAnp(pvs.pos.theta);
17486 
17487     /* Return proper motions in radians per year. */
17488        double pmr = pvs.vel.theta * DJY;
17489        double pmd = pvs.vel.phi * DJY;
17490 
17491     /* Return parallax in arcsec. */
17492        double px = DR2AS / pvs.pos.r;
17493 
17494     /* Return radial velocity in km/s. */
17495        double rv = 1e-3 * pvs.vel.r * DAU / DAYSEC;
17496 
17497     /* OK status. */
17498        return new CatalogCoords(ra, pvs.pos.phi, pmr, pmd, px, rv);
17499 
17500         }
17501     
17502 
17503     /**
17504     *  Update a pv-vector.
17505     *
17506     *<p>This function is derived from the International Astronomical Union's
17507     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17508     *
17509     *<p>Status:  vector/matrix support function.
17510     *
17511     *<!-- Given: -->
17512     *     @param dt        double            time interval
17513     *     @param pv        double[2][3]      pv-vector
17514     *
17515     *<!-- Returned: -->
17516     *     @return upv       double[2][3]       <u>returned</u> p updated, v unchanged
17517     *
17518     * <p>Notes:
17519     * <ol>
17520     *
17521     * <li> "Update" means "refer the position component of the vector
17522     *     to a new date dt time units from the existing date".
17523     *
17524     * <li> The time units of dt must match those of the velocity.
17525     *
17526     * <li> It is permissible for pv and upv to be the same array.
17527     *</ol>
17528     *<p>Called:<ul>
17529     *     <li>{@link #jauPpsp} p-vector plus scaled p-vector
17530     *     <li>{@link #jauCp} copy p-vector
17531     * </ul>
17532     *@version 2008 November 17
17533     *
17534     *  @since Release 20101201
17535     *
17536     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17537     */
17538     public static double[][] jauPvu(double dt, double pv[][] )
17539     {
17540        double upv[][] = new double[2][3];
17541        upv[0] = jauPpsp(pv[0], dt, pv[1]);
17542        jauCp(pv[1], upv[1]);
17543 
17544        return upv;
17545 
17546         }
17547     
17548 
17549     /**
17550     *  Update a pv-vector, discarding the velocity component.
17551     *
17552     *<p>This function is derived from the International Astronomical Union's
17553     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17554     *
17555     *<p>Status:  vector/matrix support function.
17556     *
17557     *<!-- Given: -->
17558     *     @param dt        double             time interval
17559     *     @param pv        double[2][3]       pv-vector
17560     *
17561     *<!-- Returned: -->
17562     *     @return p         double[3]           <u>returned</u> p-vector
17563     *
17564     * <p>Notes:
17565     * <ol>
17566     *
17567     * <li> "Update" means "refer the position component of the vector to a
17568     *     new date dt time units from the existing date".
17569     *
17570     * <li> The time units of dt must match those of the velocity.
17571     *</ol>
17572     *@version 2008 May 11
17573     *
17574     *  @since Release 20101201
17575     *
17576     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17577     */
17578     public static double[] jauPvup(double dt, double pv[][] )
17579     {
17580         double p[] = new double[3];
17581        p[0] = pv[0][0] + dt * pv[1][0];
17582        p[1] = pv[0][1] + dt * pv[1][1];
17583        p[2] = pv[0][2] + dt * pv[1][2];
17584 
17585        return p;
17586 
17587         }
17588     
17589 
17590     /**
17591     *  Outer (=vector=cross) product of two pv-vectors.
17592     *
17593     *<p>This function is derived from the International Astronomical Union's
17594     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17595     *
17596     *<p>Status:  vector/matrix support function.
17597     *
17598     *<!-- Given: -->
17599     *     @param a         double[2][3]       first pv-vector
17600     *     @param b         double[2][3]       second pv-vector
17601     *
17602     *<!-- Returned: -->
17603     *     @return axb       double[2][3]        <u>returned</u> a x b
17604     *
17605     * <p>Notes:
17606     * <ol>
17607     *
17608     * <li> If the position and velocity components of the two pv-vectors are
17609     *     ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of
17610     *     vectors ( ap x bp, ap x bv + av x bp ).  The two vectors are the
17611     *     cross-product of the two p-vectors and its derivative.
17612     *
17613     * <li> It is permissible to re-use the same array for any of the
17614     *     arguments.
17615     *</ol>
17616     *<p>Called:<ul>
17617     *     <li>{@link #jauCpv} copy pv-vector
17618     *     <li>{@link #jauPxp} vector product of two p-vectors
17619     *     <li>{@link #jauPpp} p-vector plus p-vector
17620     * </ul>
17621     *@version 2008 November 18
17622     *
17623     *  @since Release 20101201
17624     *
17625     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17626     */
17627     public static double[][] jauPvxpv(double a[][], double b[][] )
17628     {
17629        double wa[][] = new double[2][3], wb[][] = new double[2][3], axbd[] = new double[3], adxb[] = new double[3];
17630 
17631        double axb[][] = new double[2][3];
17632     /* Make copies of the inputs. */
17633        jauCpv(a, wa);
17634        jauCpv(b, wb);
17635 
17636     /* a x b = position part of result. */
17637        axb[0] = jauPxp(wa[0], wb[0]);
17638 
17639     /* a x bdot + adot x b = velocity part of result. */
17640        axbd = jauPxp(wa[0],wb[1]);
17641        adxb = jauPxp(wa[1],wb[0]);
17642        axb[1] = jauPpp(axbd, adxb);
17643 
17644        return axb;
17645 
17646         }
17647     
17648 
17649     /**
17650     *  p-vector outer (=vector=cross) product.
17651     *
17652     *<p>This function is derived from the International Astronomical Union's
17653     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17654     *
17655     *<p>Status:  vector/matrix support function.
17656     *
17657     *<!-- Given: -->
17658     *     @param a         double[3]       first p-vector
17659     *     @param b         double[3]       second p-vector
17660     *
17661     *<!-- Returned: -->
17662     *     @return axb       double[3]        <u>returned</u> a x b
17663     *
17664     *  Note:
17665     *     It is permissible to re-use the same array for any of the
17666     *     arguments.
17667     *
17668     *@version 2008 November 18
17669     *
17670     *  @since Release 20101201
17671     *
17672     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17673     */
17674     public static double[] jauPxp(double a[] , double b[]  )
17675     {
17676        double xa, ya, za, xb, yb, zb;
17677        double axb[] = new double[3];
17678 
17679        xa = a[0];
17680        ya = a[1];
17681        za = a[2];
17682        xb = b[0];
17683        yb = b[1];
17684        zb = b[2];
17685        axb[0] = ya*zb - za*yb;
17686        axb[1] = za*xb - xa*zb;
17687        axb[2] = xa*yb - ya*xb;
17688 
17689        return axb;
17690 
17691         }
17692     
17693 
17694     /**
17695     *  Express an r-matrix as an r-vector.
17696     *
17697     *<p>This function is derived from the International Astronomical Union's
17698     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17699     *
17700     *<p>Status:  vector/matrix support function.
17701     *
17702     *<!-- Given: -->
17703     *     @param r         double[3][3]     rotation matrix
17704     *
17705     *<!-- Returned: -->
17706     *     @return w         double[3]         <u>returned</u> rotation vector (Note 1)
17707     *
17708     * <p>Notes:
17709     * <ol>
17710     *
17711     * <li> A rotation matrix describes a rotation through some angle about
17712     *     some arbitrary axis called the Euler axis.  The "rotation vector"
17713     *     returned by this function has the same direction as the Euler axis,
17714     *     and its magnitude is the angle in radians.  (The magnitude and
17715     *     direction can be separated by means of the function jauPn.)
17716     *
17717     * <li> If r is null, so is the result.  If r is not a rotation matrix
17718     *     the result is undefined;  r must be proper (i.e. have a positive
17719     *     determinant) and real orthogonal (inverse = transpose).
17720     *
17721     * <li> The reference frame rotates clockwise as seen looking along
17722     *     the rotation vector from the origin.
17723     *</ol>
17724     *@version 2008 May 12
17725     *
17726     *  @since Release 20101201
17727     *
17728     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17729     */
17730     public static double[] jauRm2v(double r[][] )
17731     {
17732        double x, y, z, s2, c2, phi, f;
17733        double w[] = new double[3];
17734 
17735        x = r[1][2] - r[2][1];
17736        y = r[2][0] - r[0][2];
17737        z = r[0][1] - r[1][0];
17738        s2 = sqrt(x*x + y*y + z*z);
17739        if (s2 > 0) {
17740           c2 = r[0][0] + r[1][1] + r[2][2] - 1;
17741           phi = atan2(s2, c2);
17742           f =  phi / s2;
17743           w[0] = x * f;
17744           w[1] = y * f;
17745           w[2] = z * f;
17746        } else {
17747           w[0] = 0.0;
17748           w[1] = 0.0;
17749           w[2] = 0.0;
17750        }
17751 
17752        return w;
17753 
17754         }
17755     
17756 
17757     /**
17758     *  Form the r-matrix corresponding to a given r-vector.
17759     *
17760     *<p>This function is derived from the International Astronomical Union's
17761     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17762     *
17763     *<p>Status:  vector/matrix support function.
17764     *
17765     *<!-- Given: -->
17766     *     @param w         double[3]       rotation vector (Note 1)
17767     *
17768     *<!-- Returned: -->
17769     *     @return r         double[3][3]      <u>returned</u> rotation matrix
17770     *
17771     * <p>Notes:
17772     * <ol>
17773     *
17774     * <li> A rotation matrix describes a rotation through some angle about
17775     *     some arbitrary axis called the Euler axis.  The "rotation vector"
17776     *     supplied to This function has the same direction as the Euler
17777     *     axis, and its magnitude is the angle in radians.
17778     *
17779     * <li> If w is null, the unit matrix is returned.
17780     *
17781     * <li> The reference frame rotates clockwise as seen looking along the
17782     *     rotation vector from the origin.
17783     *</ol>
17784     *@version 2008 May 11
17785     *
17786     *  @since Release 20101201
17787     *
17788     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17789     */
17790     public static double[][] jauRv2m(double w[])
17791     {
17792        double x, y, z, phi, s, c, f;
17793        double r[][] = new double[3][3];
17794 
17795 
17796     /* Euler angle (magnitude of rotation vector) and functions. */
17797        x = w[0];
17798        y = w[1];
17799        z = w[2];
17800        phi = sqrt(x*x + y*y + z*z);
17801        s = sin(phi);
17802        c = cos(phi);
17803        f = 1.0 - c;
17804 
17805     /* Euler axis (direction of rotation vector), perhaps null. */
17806        if (phi > 0.0) {
17807            x /= phi;
17808            y /= phi;
17809            z /= phi;
17810        }
17811 
17812     /* Form the rotation matrix. */
17813        r[0][0] = x*x*f + c;
17814        r[0][1] = x*y*f + z*s;
17815        r[0][2] = x*z*f - y*s;
17816        r[1][0] = y*x*f - z*s;
17817        r[1][1] = y*y*f + c;
17818        r[1][2] = y*z*f + x*s;
17819        r[2][0] = z*x*f + y*s;
17820        r[2][1] = z*y*f - x*s;
17821        r[2][2] = z*z*f + c;
17822 
17823        return r;
17824 
17825         }
17826     
17827 
17828     /**
17829     *  Rotate an r-matrix about the x-axis.
17830     *
17831     *<p>This function is derived from the International Astronomical Union's
17832     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17833     *
17834     *<p>Status:  vector/matrix support function.
17835     *
17836     *<!-- Given: -->
17837     *     @param phi     double           angle (radians)
17838     *
17839     *  Given and returned:
17840     *      @param r      double[3][3]    r-matrix <u>given and returned</u>
17841     *
17842     *  Sign convention:  The matrix can be used to rotate the reference
17843     *  frame of a vector.  Calling this function with positive phi
17844     *  incorporates in the matrix an additional rotation, about the x-axis,
17845     *  anticlockwise as seen looking towards the origin from positive x.
17846     *
17847     *<p>Called:<ul>
17848     *     <li>{@link #jauIr} initialize r-matrix to identity
17849     *     <li>{@link #jauRxr} product of two r-matrices
17850     *     <li>{@link #jauCr} copy r-matrix
17851     * </ul>
17852     *@version 2008 May 22
17853     *
17854     *  @since Release 20101201
17855     *
17856     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17857     */
17858     public static void jauRx(double phi, double r[][])
17859     {
17860        double s, c, a[][] = new double[3][3], w[][];
17861 
17862 
17863     /* Matrix representing new rotation. */
17864        s = sin(phi);
17865        c = cos(phi);
17866        jauIr(a);
17867        a[1][1] =  c;
17868        a[2][1] = -s;
17869        a[1][2] =  s;
17870        a[2][2] =  c;
17871 
17872     /* Rotate. */
17873        w = jauRxr(a, r);
17874 
17875     /* Return result. */
17876        jauCr(w, r);
17877 
17878        return;
17879 
17880         }
17881     
17882 
17883     /**
17884     *  Multiply a p-vector by an r-matrix.
17885     *
17886     *<p>This function is derived from the International Astronomical Union's
17887     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17888     *
17889     *<p>Status:  vector/matrix support function.
17890     *
17891     *<!-- Given: -->
17892     *     @param r         double[3][3]     r-matrix
17893     *     @param p         double[3]        p-vector
17894     *
17895     *<!-- Returned: -->
17896     *     @return rp        double[3]         <u>returned</u> r * p
17897     *
17898     *  Note:
17899     *     It is permissible for p and rp to be the same array.
17900     *
17901     *<p>Called:<ul>
17902     *     <li>{@link #jauCp} copy p-vector
17903     * </ul>
17904     *@version 2008 October 28
17905     *
17906     *  @since Release 20101201
17907     *
17908     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17909     */
17910     public static double[] jauRxp(double r[][], double p[])
17911     {
17912        double w, wrp[] = new double[3] ;
17913        int i, j;
17914 
17915 
17916     /* Matrix r * vector p. */
17917        for (j = 0; j < 3; j++) {
17918            w = 0.0;
17919            for (i = 0; i < 3; i++) {
17920                w += r[j][i] * p[i];
17921            }
17922            wrp[j] = w;
17923        }
17924 
17925 
17926        return wrp;
17927 
17928         }
17929     
17930 
17931     /**
17932     *  Multiply a pv-vector by an r-matrix.
17933     *
17934     *<p>This function is derived from the International Astronomical Union's
17935     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17936     *
17937     *<p>Status:  vector/matrix support function.
17938     *
17939     *<!-- Given: -->
17940     *     @param r         double[3][3]     r-matrix
17941     *     @param pv        double[2][3]     pv-vector
17942     *
17943     *<!-- Returned: -->
17944     *     @return rpv       double[2][3]      <u>returned</u> r * pv
17945     *
17946     *  Note:
17947     *     It is permissible for pv and rpv to be the same array.
17948     *
17949     *<p>Called:<ul>
17950     *     <li>{@link #jauRxp} product of r-matrix and p-vector
17951     * </ul>
17952     *@version 2008 October 28
17953     *
17954     *  @since Release 20101201
17955     *
17956     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17957     */
17958     public static double[][] jauRxpv(double r[][], double pv[][])
17959     {
17960        double rpv[][] = new double[2][0];
17961        rpv[0] = jauRxp(r, pv[0]);
17962        rpv[1] = jauRxp(r, pv[1]);
17963 
17964        return rpv;
17965 
17966         }
17967     
17968 
17969     /**
17970     *  Multiply two r-matrices.
17971     *
17972     *<p>This function is derived from the International Astronomical Union's
17973     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17974     *
17975     *<p>Status:  vector/matrix support function.
17976     *
17977     *<!-- Given: -->
17978     *     @param a         double[3][3]     first r-matrix
17979     *     @param b         double[3][3]     second r-matrix
17980     *
17981     *<!-- Returned: -->
17982     *     @return atb       double[3][3]      <u>returned</u> a * b
17983     *
17984     *  Note:
17985     *     It is permissible to re-use the same array for any of the
17986     *     arguments.
17987     *
17988     *<p>Called:<ul>
17989     *     <li>{@link #jauCr} copy r-matrix
17990     * </ul>
17991     *@version 2008 November 18
17992     *
17993     *  @since Release 20101201
17994     *
17995     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17996     */
17997     public static double[][] jauRxr(double a[][], double b[][])
17998     {
17999        int i, j, k;
18000        double w, wm[][] = new double[3][3];
18001 
18002 
18003        for (i = 0; i < 3; i++) {
18004           for (j = 0; j < 3; j++) {
18005              w = 0.0;
18006              for (k = 0; k < 3; k++) {
18007                 w +=  a[i][k] * b[k][j];
18008              }
18009              wm[i][j] = w;
18010           }
18011        }
18012 
18013        return wm;
18014 
18015      }
18016     
18017 
18018     /**
18019     *  Rotate an r-matrix about the y-axis.
18020     *
18021     *<p>This function is derived from the International Astronomical Union's
18022     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18023     *
18024     *<p>Status:  vector/matrix support function.
18025     *
18026     *<!-- Given: -->
18027     *     @param theta   double           angle (radians)
18028     *
18029     *  Given and returned:
18030     *     @param r      double[3][3]   <u>given &amp; returned</u> r-matrix
18031     *
18032     *  Sign convention:  The matrix can be used to rotate the reference
18033     *  frame of a vector.  Calling This function with positive theta
18034     *  incorporates in the matrix an additional rotation, about the y-axis,
18035     *  anticlockwise as seen looking towards the origin from positive y.
18036     *
18037     *<p>Called:<ul>
18038     *     <li>{@link #jauIr} initialize r-matrix to identity
18039     *     <li>{@link #jauRxr} product of two r-matrices
18040     *     <li>{@link #jauCr} copy r-matrix
18041     * </ul>
18042     *@version 2008 May 22
18043     *
18044     *  @since Release 20101201
18045     *
18046     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18047     */
18048     public static void jauRy(double theta, double r[][])
18049     {
18050        double s, c, a[][] = new double[3][3], w[][];
18051 
18052 
18053     /* Matrix representing new rotation. */
18054        s = sin(theta);
18055        c = cos(theta);
18056        jauIr(a);
18057        a[0][0] =  c;
18058        a[2][0] =  s;
18059        a[0][2] = -s;
18060        a[2][2] =  c;
18061 
18062     /* Rotate. */
18063        w = jauRxr(a, r);
18064 
18065     /* Return result. */
18066        jauCr(w, r);
18067 
18068        return;
18069 
18070         }
18071     
18072 
18073     /**
18074     *  Rotate an r-matrix about the z-axis.
18075     *
18076     *<p>This function is derived from the International Astronomical Union's
18077     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18078     *
18079     *<p>Status:  vector/matrix support function.
18080     *
18081     *<!-- Given: -->
18082     *     @param psi     double           angle (radians)
18083     *
18084     *  Given and returned:
18085     *     @param r      double[3][3]    <u>given &amp; retuned</u>r-matrix, rotated
18086     *
18087     *  Sign convention:  The matrix can be used to rotate the reference
18088     *  frame of a vector.  Calling This function with positive psi
18089     *  incorporates in the matrix an additional rotation, about the z-axis,
18090     *  anticlockwise as seen looking towards the origin from positive z.
18091     *
18092     *<p>Called:<ul>
18093     *     <li>{@link #jauIr} initialize r-matrix to identity
18094     *     <li>{@link #jauRxr} product of two r-matrices
18095     *     <li>{@link #jauCr} copy r-matrix
18096     * </ul>
18097     *@version 2008 May 22
18098     *
18099     *  @since Release 20101201
18100     *
18101     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18102     */
18103     public static void jauRz(double psi, double r[][])
18104     {
18105        double s, c, a[][] = new double[3][3], w[][];
18106 
18107 
18108     /* Matrix representing new rotation. */
18109        s = sin(psi);
18110        c = cos(psi);
18111        jauIr(a);
18112        a[0][0] =  c;
18113        a[1][0] = -s;
18114        a[0][1] =  s;
18115        a[1][1] =  c;
18116 
18117     /* Rotate. */
18118        w = jauRxr(a, r);
18119 
18120     /* Return result. */
18121        jauCr(w, r);
18122 
18123        return;
18124 
18125         }
18126     
18127 
18128     /**
18129     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18130     *  the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18131     *  coordinates.  Compatible with IAU 2000A precession-nutation.
18132     *
18133     *<p>This function is derived from the International Astronomical Union's
18134     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18135     *
18136     *<p>Status:  canonical model.
18137     *
18138     *<!-- Given: -->
18139     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18140     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18141     *     @param x double     CIP coordinates (Note 3)
18142     *     @param y double     CIP coordinates (Note 3) 
18143     *
18144     * <!-- Returned (function value): -->
18145     *  @return double    the CIO locator s in radians (Note 2)
18146     *
18147     * <p>Notes:
18148     * <ol>
18149     *
18150     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18151     *     convenient way between the two arguments.  For example,
18152     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18153     *     among others:
18154     *<pre>
18155     *            date1          date2
18156     *
18157     *         2450123.7           0.0       (JD method)
18158     *         2451545.0       -1421.3       (J2000 method)
18159     *         2400000.5       50123.2       (MJD method)
18160     *         2450123.5           0.2       (date &amp; time method)
18161     *</pre>
18162     *     The JD method is the most natural and convenient to use in
18163     *     cases where the loss of several decimal digits of resolution
18164     *     is acceptable.  The J2000 method is best matched to the way
18165     *     the argument is handled internally and will deliver the
18166     *     optimum resolution.  The MJD method and the date &amp; time methods
18167     *     are both good compromises between resolution and convenience.
18168     *
18169     * <li> The CIO locator s is the difference between the right ascensions
18170     *     of the same point in two systems:  the two systems are the GCRS
18171     *     and the CIP,CIO, and the point is the ascending node of the
18172     *     CIP equator.  The quantity s remains below 0.1 arcsecond
18173     *     throughout 1900-2100.
18174     *
18175     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18176     *     are the x and y components of the CIP unit vector;  this series
18177     *     is more compact than a direct series for s would be.  This
18178     *     function requires X,Y to be supplied by the caller, who is
18179     *     responsible for providing values that are consistent with the
18180     *     supplied date.
18181     *
18182     * <li> The model is consistent with the IAU 2000A precession-nutation.
18183     *</ol>
18184     *<p>Called:<ul>
18185     *     <li>{@link #jauFal03} mean anomaly of the Moon
18186     *     <li>{@link #jauFalp03} mean anomaly of the Sun
18187     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18188     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18189     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18190     *     <li>{@link #jauFave03} mean longitude of Venus
18191     *     <li>{@link #jauFae03} mean longitude of Earth
18192     *     <li>{@link #jauFapa03} general accumulated precession in longitude
18193     * </ul>
18194     *<p>References:
18195     *
18196     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18197     *     "Expressions for the Celestial Intermediate Pole and Celestial
18198     *     Ephemeris Origin consistent with the IAU 2000A precession-
18199     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18200     *
18201     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18202     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18203     *
18204     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18205     *     IERS Technical Note No. 32, BKG (2004)
18206     *
18207     *@version 2010 January 18
18208     *
18209     *  @since Release 20101201
18210     *
18211     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18212     */
18213     public static double jauS00(double date1, double date2, double x, double y)
18214     {
18215     /* Time since J2000.0, in Julian centuries */
18216        double t;
18217 
18218     /* Miscellaneous */
18219        int i, j;
18220        double a, w0, w1, w2, w3, w4, w5;
18221 
18222     /* Fundamental arguments */
18223        double fa[] = new double[8];
18224 
18225     /* Returned value */
18226        double s;
18227 
18228     /* --------------------- */
18229     /* The series for s+XY/2 */
18230     /* --------------------- */
18231 
18232     /* Polynomial coefficients */
18233        final double sp[] = {
18234 
18235        /* 1-6 */
18236               94.00e-6,
18237             3808.35e-6,
18238             -119.94e-6,
18239           -72574.09e-6,
18240               27.70e-6,
18241               15.61e-6
18242        };
18243 
18244     /* Terms of order t^0 */
18245        final TERM s0[] = {
18246 
18247        /* 1-10 */
18248           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, -2640.73e-6,   0.39e-6 ),
18249           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   -63.53e-6,   0.02e-6 ),
18250           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   -11.75e-6,  -0.01e-6 ),
18251           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   -11.21e-6,  -0.01e-6 ),
18252           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},     4.57e-6,   0.00e-6 ),
18253           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    -2.02e-6,   0.00e-6 ),
18254           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    -1.98e-6,   0.00e-6 ),
18255           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},     1.72e-6,   0.00e-6 ),
18256           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},     1.41e-6,   0.01e-6 ),
18257           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},     1.26e-6,   0.01e-6 ),
18258 
18259        /* 11-20 */
18260           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18261           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18262           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    -0.46e-6,   0.00e-6 ),
18263           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    -0.45e-6,   0.00e-6 ),
18264           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    -0.36e-6,   0.00e-6 ),
18265           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},     0.24e-6,   0.12e-6 ),
18266           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.32e-6,   0.00e-6 ),
18267           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.28e-6,   0.00e-6 ),
18268           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18269           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18270 
18271        /* 21-30 */
18272           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},     0.21e-6,   0.00e-6 ),
18273           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    -0.19e-6,   0.00e-6 ),
18274           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    -0.18e-6,   0.00e-6 ),
18275           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},     0.10e-6,  -0.05e-6 ),
18276           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.15e-6,   0.00e-6 ),
18277           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18278           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18279           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18280           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18281           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18282 
18283        /* 31-33 */
18284           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},     0.11e-6,   0.00e-6 ),
18285           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    -0.11e-6,   0.00e-6 ),
18286           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18287        };
18288 
18289     /* Terms of order t^1 */
18290        final TERM s1[] ={
18291 
18292        /* 1-3 */
18293           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -0.07e-6,   3.57e-6 ),
18294           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     1.71e-6,  -0.03e-6 ),
18295           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},     0.00e-6,   0.48e-6 )
18296        };
18297 
18298     /* Terms of order t^2 */
18299        final TERM s2[] ={
18300 
18301        /* 1-10 */
18302           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},   743.53e-6,  -0.17e-6 ),
18303           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    56.91e-6,   0.06e-6 ),
18304           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},     9.84e-6,  -0.01e-6 ),
18305           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -8.85e-6,   0.01e-6 ),
18306           new TERM(new int[]{ 0,  1,  0,  0,  0,  0,  0,  0},    -6.38e-6,  -0.05e-6 ),
18307           new TERM(new int[]{ 1,  0,  0,  0,  0,  0,  0,  0},    -3.07e-6,   0.00e-6 ),
18308           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     2.23e-6,   0.00e-6 ),
18309           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},     1.67e-6,   0.00e-6 ),
18310           new TERM(new int[]{ 1,  0,  2,  0,  2,  0,  0,  0},     1.30e-6,   0.00e-6 ),
18311           new TERM(new int[]{ 0,  1, -2,  2, -2,  0,  0,  0},     0.93e-6,   0.00e-6 ),
18312 
18313        /* 11-20 */
18314           new TERM(new int[]{ 1,  0,  0, -2,  0,  0,  0,  0},     0.68e-6,   0.00e-6 ),
18315           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},    -0.55e-6,   0.00e-6 ),
18316           new TERM(new int[]{ 1,  0, -2,  0, -2,  0,  0,  0},     0.53e-6,   0.00e-6 ),
18317           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18318           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18319           new TERM(new int[]{ 1,  0, -2, -2, -2,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18320           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},    -0.25e-6,   0.00e-6 ),
18321           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},     0.22e-6,   0.00e-6 ),
18322           new TERM(new int[]{ 2,  0,  0, -2,  0,  0,  0,  0},    -0.21e-6,   0.00e-6 ),
18323           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.20e-6,   0.00e-6 ),
18324 
18325        /* 21-25 */
18326           new TERM(new int[]{ 0,  0,  2,  2,  2,  0,  0,  0},     0.17e-6,   0.00e-6 ),
18327           new TERM(new int[]{ 2,  0,  2,  0,  2,  0,  0,  0},     0.13e-6,   0.00e-6 ),
18328           new TERM(new int[]{ 2,  0,  0,  0,  0,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18329           new TERM(new int[]{ 1,  0,  2, -2,  2,  0,  0,  0},    -0.12e-6,   0.00e-6 ),
18330           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18331        };
18332 
18333     /* Terms of order t^3 */
18334        final TERM s3[] ={
18335 
18336        /* 1-4 */
18337           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     0.30e-6, -23.51e-6 ),
18338           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    -0.03e-6,  -1.39e-6 ),
18339           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.01e-6,  -0.24e-6 ),
18340           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},     0.00e-6,   0.22e-6 )
18341        };
18342 
18343     /* Terms of order t^4 */
18344        final TERM s4[] ={
18345 
18346        /* 1-1 */
18347           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.26e-6,  -0.01e-6 )
18348        };
18349 
18350     /* Number of terms in the series */
18351        final int NS0 = s0.length;
18352        final int NS1 = s1.length;
18353        final int NS2 = s2.length;
18354        final int NS3 = s3.length;
18355        final int NS4 = s4.length;
18356 
18357     /*--------------------------------------------------------------------*/
18358 
18359     /* Interval between fundamental epoch J2000.0 and current date (JC). */
18360        t = ((date1 - DJ00) + date2) / DJC;
18361 
18362     /* Fundamental Arguments (from IERS Conventions 2003) */
18363 
18364     /* Mean anomaly of the Moon. */
18365        fa[0] = jauFal03(t);
18366 
18367     /* Mean anomaly of the Sun. */
18368        fa[1] = jauFalp03(t);
18369 
18370     /* Mean longitude of the Moon minus that of the ascending node. */
18371        fa[2] = jauFaf03(t);
18372 
18373     /* Mean elongation of the Moon from the Sun. */
18374        fa[3] = jauFad03(t);
18375 
18376     /* Mean longitude of the ascending node of the Moon. */
18377        fa[4] = jauFaom03(t);
18378 
18379     /* Mean longitude of Venus. */
18380        fa[5] = jauFave03(t);
18381 
18382     /* Mean longitude of Earth. */
18383        fa[6] = jauFae03(t);
18384 
18385     /* General precession in longitude. */
18386        fa[7] = jauFapa03(t);
18387 
18388     /* Evaluate s. */
18389        w0 = sp[0];
18390        w1 = sp[1];
18391        w2 = sp[2];
18392        w3 = sp[3];
18393        w4 = sp[4];
18394        w5 = sp[5];
18395 
18396        for (i = NS0-1; i >= 0; i--) {
18397        a = 0.0;
18398        for (j = 0; j < 8; j++) {
18399            a += (double)s0[i].nfa[j] * fa[j];
18400        }
18401        w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18402        }
18403 
18404        for (i = NS1-1; i >= 0; i--) {
18405        a = 0.0;
18406        for (j = 0; j < 8; j++) {
18407            a += (double)s1[i].nfa[j] * fa[j];
18408        }
18409        w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18410        }
18411 
18412        for (i = NS2-1; i >= 0; i--) {
18413        a = 0.0;
18414        for (j = 0; j < 8; j++) {
18415            a += (double)s2[i].nfa[j] * fa[j];
18416        }
18417        w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18418        }
18419 
18420        for (i = NS3-1; i >= 0; i--) {
18421        a = 0.0;
18422        for (j = 0; j < 8; j++) {
18423            a += (double)s3[i].nfa[j] * fa[j];
18424        }
18425        w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18426        }
18427 
18428        for (i = NS4-1; i >= 0; i--) {
18429        a = 0.0;
18430        for (j = 0; j < 8; j++) {
18431            a += (double)s4[i].nfa[j] * fa[j];
18432        }
18433        w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18434        }
18435 
18436        s = (w0 +
18437            (w1 +
18438            (w2 +
18439            (w3 +
18440            (w4 +
18441             w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18442 
18443        return s;
18444 
18445         }
18446     
18447 
18448     /**
18449     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18450     *  the equator of the Celestial Intermediate Pole, using the IAU 2000A
18451     *  precession-nutation model.
18452     *
18453     *<p>This function is derived from the International Astronomical Union's
18454     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18455     *
18456     *<p>Status:  support function.
18457     *
18458     *<!-- Given: -->
18459     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18460     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18461     *
18462     * <!-- Returned (function value): -->
18463     *  @return double    the CIO locator s in radians (Note 2)
18464     *
18465     * <p>Notes:
18466     * <ol>
18467     *
18468     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18469     *     convenient way between the two arguments.  For example,
18470     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18471     *     among others:
18472     *<pre>
18473     *            date1          date2
18474     *
18475     *         2450123.7           0.0       (JD method)
18476     *         2451545.0       -1421.3       (J2000 method)
18477     *         2400000.5       50123.2       (MJD method)
18478     *         2450123.5           0.2       (date &amp; time method)
18479     *</pre>
18480     *     The JD method is the most natural and convenient to use in
18481     *     cases where the loss of several decimal digits of resolution
18482     *     is acceptable.  The J2000 method is best matched to the way
18483     *     the argument is handled internally and will deliver the
18484     *     optimum resolution.  The MJD method and the date &amp; time methods
18485     *     are both good compromises between resolution and convenience.
18486     *
18487     * <li> The CIO locator s is the difference between the right ascensions
18488     *     of the same point in two systems.  The two systems are the GCRS
18489     *     and the CIP,CIO, and the point is the ascending node of the
18490     *     CIP equator.  The CIO locator s remains a small fraction of
18491     *     1 arcsecond throughout 1900-2100.
18492     *
18493     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18494     *     are the x and y components of the CIP unit vector;  this series
18495     *     is more compact than a direct series for s would be.  The present
18496     *     function uses the full IAU 2000A nutation model when predicting
18497     *     the CIP position.  Faster results, with no significant loss of
18498     *     accuracy, can be obtained via the function jauS00b, which uses
18499     *     instead the IAU 2000B truncated model.
18500     *</ol>
18501     *<p>Called:<ul>
18502     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
18503     *     <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18504     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18505     * </ul>
18506     *<p>References:
18507     *
18508     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18509     *     "Expressions for the Celestial Intermediate Pole and Celestial
18510     *     Ephemeris Origin consistent with the IAU 2000A precession-
18511     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18512     *
18513     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18514     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18515     *
18516     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18517     *     IERS Technical Note No. 32, BKG (2004)
18518     *
18519     *@version 2010 January 18
18520     *
18521     *  @since Release 20101201
18522     *
18523     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18524     */
18525     public static double jauS00a(double date1, double date2)
18526     {
18527        double s;
18528 
18529 
18530     /* Bias-precession-nutation-matrix, IAU 2000A. */
18531        double rbpn[][] = jauPnm00a(date1, date2);
18532 
18533     /* Extract the CIP coordinates. */
18534        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18535 
18536     /* Compute the CIO locator s, given the CIP coordinates. */
18537        s = jauS00(date1, date2, cip.x, cip.y);
18538 
18539        return s;
18540 
18541         }
18542     
18543 
18544     /**
18545     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18546     *  the equator of the Celestial Intermediate Pole, using the IAU 2000B
18547     *  precession-nutation model.
18548     *
18549     *<p>This function is derived from the International Astronomical Union's
18550     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18551     *
18552     *<p>Status:  support function.
18553     *
18554     *<!-- Given: -->
18555     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18556     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18557     *
18558     * <!-- Returned (function value): -->
18559     *  @return double    the CIO locator s in radians (Note 2)
18560     *
18561     * <p>Notes:
18562     * <ol>
18563     *
18564     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18565     *     convenient way between the two arguments.  For example,
18566     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18567     *     among others:
18568     *<pre>
18569     *            date1          date2
18570     *
18571     *         2450123.7           0.0       (JD method)
18572     *         2451545.0       -1421.3       (J2000 method)
18573     *         2400000.5       50123.2       (MJD method)
18574     *         2450123.5           0.2       (date &amp; time method)
18575     *</pre>
18576     *     The JD method is the most natural and convenient to use in
18577     *     cases where the loss of several decimal digits of resolution
18578     *     is acceptable.  The J2000 method is best matched to the way
18579     *     the argument is handled internally and will deliver the
18580     *     optimum resolution.  The MJD method and the date &amp; time methods
18581     *     are both good compromises between resolution and convenience.
18582     *
18583     * <li> The CIO locator s is the difference between the right ascensions
18584     *     of the same point in two systems.  The two systems are the GCRS
18585     *     and the CIP,CIO, and the point is the ascending node of the
18586     *     CIP equator.  The CIO locator s remains a small fraction of
18587     *     1 arcsecond throughout 1900-2100.
18588     *
18589     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18590     *     are the x and y components of the CIP unit vector;  this series
18591     *     is more compact than a direct series for s would be.  The present
18592     *     function uses the IAU 2000B truncated nutation model when
18593     *     predicting the CIP position.  The function jauS00a uses instead
18594     *     the full IAU 2000A model, but with no significant increase in
18595     *     accuracy and at some cost in speed.
18596     *</ol>
18597     *<p>Called:<ul>
18598     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
18599     *     <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18600     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18601     * </ul>
18602     *<p>References:
18603     *
18604     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18605     *     "Expressions for the Celestial Intermediate Pole and Celestial
18606     *     Ephemeris Origin consistent with the IAU 2000A precession-
18607     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18608     *
18609     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18610     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18611     *
18612     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18613     *     IERS Technical Note No. 32, BKG (2004)
18614     *
18615     *@version 2010 January 18
18616     *
18617     *  @since Release 20101201
18618     *
18619     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18620     */
18621     public static double jauS00b(double date1, double date2)
18622     {
18623        double rbpn[][] = new double[3][3], s;
18624 
18625 
18626     /* Bias-precession-nutation-matrix, IAU 2000B. */
18627        rbpn = jauPnm00b(date1, date2);
18628 
18629     /* Extract the CIP coordinates. */
18630        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18631 
18632     /* Compute the CIO locator s, given the CIP coordinates. */
18633        s = jauS00(date1, date2, cip.x, cip.y);
18634 
18635        return s;
18636 
18637         }
18638     
18639 
18640     /**
18641     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18642     *  the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18643     *  coordinates.  Compatible with IAU 2006/2000A precession-nutation.
18644     *
18645     *<p>This function is derived from the International Astronomical Union's
18646     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18647     *
18648     *<p>Status:  canonical model.
18649     *
18650     *<!-- Given: -->
18651     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18652     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18653     *     @param x double     CIP coordinates (Note 3)
18654     *     @param y double     CIP coordinates (Note 3) 
18655     *
18656     * <!-- Returned (function value): -->
18657     *  @return double    the CIO locator s in radians (Note 2)
18658     *
18659     * <p>Notes:
18660     * <ol>
18661     *
18662     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18663     *     convenient way between the two arguments.  For example,
18664     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18665     *     among others:
18666     *<pre>
18667     *            date1          date2
18668     *
18669     *         2450123.7           0.0       (JD method)
18670     *         2451545.0       -1421.3       (J2000 method)
18671     *         2400000.5       50123.2       (MJD method)
18672     *         2450123.5           0.2       (date &amp; time method)
18673     *</pre>
18674     *     The JD method is the most natural and convenient to use in
18675     *     cases where the loss of several decimal digits of resolution
18676     *     is acceptable.  The J2000 method is best matched to the way
18677     *     the argument is handled internally and will deliver the
18678     *     optimum resolution.  The MJD method and the date &amp; time methods
18679     *     are both good compromises between resolution and convenience.
18680     *
18681     * <li> The CIO locator s is the difference between the right ascensions
18682     *     of the same point in two systems:  the two systems are the GCRS
18683     *     and the CIP,CIO, and the point is the ascending node of the
18684     *     CIP equator.  The quantity s remains below 0.1 arcsecond
18685     *     throughout 1900-2100.
18686     *
18687     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18688     *     are the x and y components of the CIP unit vector;  this series
18689     *     is more compact than a direct series for s would be.  This
18690     *     function requires X,Y to be supplied by the caller, who is
18691     *     responsible for providing values that are consistent with the
18692     *     supplied date.
18693     *
18694     * <li> The model is consistent with the "P03" precession (Capitaine et
18695     *     al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the
18696     *     IAU 2000A nutation (with P03 adjustments).
18697     *</ol>
18698     *<p>Called:<ul>
18699     *     <li>{@link #jauFal03} mean anomaly of the Moon
18700     *     <li>{@link #jauFalp03} mean anomaly of the Sun
18701     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18702     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18703     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18704     *     <li>{@link #jauFave03} mean longitude of Venus
18705     *     <li>{@link #jauFae03} mean longitude of Earth
18706     *     <li>{@link #jauFapa03} general accumulated precession in longitude
18707     * </ul>
18708     *<p>References:
18709     *
18710     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2003, Astron.
18711     *     Astrophys. 432, 355
18712     *
18713     *     <p>McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003),
18714     *     IERS Technical Note No. 32, BKG
18715     *
18716     *@version 2009 December 17
18717     *
18718     *  @since Release 20101201
18719     *
18720     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18721     */
18722     public static double jauS06(double date1, double date2, double x, double y)
18723     {
18724     /* Time since J2000.0, in Julian centuries */
18725        double t;
18726 
18727     /* Miscellaneous */
18728        int i, j;
18729        double a, w0, w1, w2, w3, w4, w5;
18730 
18731     /* Fundamental arguments */
18732        double fa[] = new double[8];
18733 
18734     /* Returned value */
18735        double s;
18736 
18737     /* --------------------- */
18738     /* The series for s+XY/2 */
18739     /* --------------------- */
18740 
18741     /* Polynomial coefficients */
18742        final double sp[] = {
18743 
18744        /* 1-6 */
18745               94.00e-6,
18746             3808.65e-6,
18747             -122.68e-6,
18748           -72574.11e-6,
18749               27.98e-6,
18750               15.62e-6
18751        };
18752 
18753     /* Terms of order t^0 */
18754        final TERM s0[] = {
18755 
18756        /* 1-10 */
18757           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, -2640.73e-6,   0.39e-6 ),
18758           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   -63.53e-6,   0.02e-6 ),
18759           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   -11.75e-6,  -0.01e-6 ),
18760           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   -11.21e-6,  -0.01e-6 ),
18761           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},     4.57e-6,   0.00e-6 ),
18762           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    -2.02e-6,   0.00e-6 ),
18763           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    -1.98e-6,   0.00e-6 ),
18764           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},     1.72e-6,   0.00e-6 ),
18765           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},     1.41e-6,   0.01e-6 ),
18766           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},     1.26e-6,   0.01e-6 ),
18767 
18768        /* 11-20 */
18769           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18770           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18771           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    -0.46e-6,   0.00e-6 ),
18772           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    -0.45e-6,   0.00e-6 ),
18773           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    -0.36e-6,   0.00e-6 ),
18774           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},     0.24e-6,   0.12e-6 ),
18775           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.32e-6,   0.00e-6 ),
18776           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.28e-6,   0.00e-6 ),
18777           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18778           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18779 
18780        /* 21-30 */
18781           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},     0.21e-6,   0.00e-6 ),
18782           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    -0.19e-6,   0.00e-6 ),
18783           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    -0.18e-6,   0.00e-6 ),
18784           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},     0.10e-6,  -0.05e-6 ),
18785           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.15e-6,   0.00e-6 ),
18786           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18787           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18788           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18789           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18790           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18791 
18792        /* 31-33 */
18793           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},     0.11e-6,   0.00e-6 ),
18794           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    -0.11e-6,   0.00e-6 ),
18795           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18796        };
18797 
18798     /* Terms of order t^1 */
18799        final TERM s1[] = {
18800 
18801        /* 1 - 3 */
18802           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -0.07e-6,   3.57e-6 ),
18803           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     1.73e-6,  -0.03e-6 ),
18804           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},     0.00e-6,   0.48e-6 )
18805        };
18806 
18807     /* Terms of order t^2 */
18808        final TERM s2[] = {
18809 
18810        /* 1-10 */
18811           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},   743.52e-6,  -0.17e-6 ),
18812           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    56.91e-6,   0.06e-6 ),
18813           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},     9.84e-6,  -0.01e-6 ),
18814           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -8.85e-6,   0.01e-6 ),
18815           new TERM(new int[]{ 0,  1,  0,  0,  0,  0,  0,  0},    -6.38e-6,  -0.05e-6 ),
18816           new TERM(new int[]{ 1,  0,  0,  0,  0,  0,  0,  0},    -3.07e-6,   0.00e-6 ),
18817           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     2.23e-6,   0.00e-6 ),
18818           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},     1.67e-6,   0.00e-6 ),
18819           new TERM(new int[]{ 1,  0,  2,  0,  2,  0,  0,  0},     1.30e-6,   0.00e-6 ),
18820           new TERM(new int[]{ 0,  1, -2,  2, -2,  0,  0,  0},     0.93e-6,   0.00e-6 ),
18821 
18822        /* 11-20 */
18823           new TERM(new int[]{ 1,  0,  0, -2,  0,  0,  0,  0},     0.68e-6,   0.00e-6 ),
18824           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},    -0.55e-6,   0.00e-6 ),
18825           new TERM(new int[]{ 1,  0, -2,  0, -2,  0,  0,  0},     0.53e-6,   0.00e-6 ),
18826           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18827           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18828           new TERM(new int[]{ 1,  0, -2, -2, -2,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18829           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},    -0.25e-6,   0.00e-6 ),
18830           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},     0.22e-6,   0.00e-6 ),
18831           new TERM(new int[]{ 2,  0,  0, -2,  0,  0,  0,  0},    -0.21e-6,   0.00e-6 ),
18832           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.20e-6,   0.00e-6 ),
18833 
18834        /* 21-25 */
18835           new TERM(new int[]{ 0,  0,  2,  2,  2,  0,  0,  0},     0.17e-6,   0.00e-6 ),
18836           new TERM(new int[]{ 2,  0,  2,  0,  2,  0,  0,  0},     0.13e-6,   0.00e-6 ),
18837           new TERM(new int[]{ 2,  0,  0,  0,  0,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18838           new TERM(new int[]{ 1,  0,  2, -2,  2,  0,  0,  0},    -0.12e-6,   0.00e-6 ),
18839           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18840        };
18841 
18842     /* Terms of order t^3 */
18843        final TERM s3[] = {
18844 
18845        /* 1-4 */
18846           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     0.30e-6, -23.42e-6 ),
18847           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    -0.03e-6,  -1.46e-6 ),
18848           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.01e-6,  -0.25e-6 ),
18849           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},     0.00e-6,   0.23e-6 )
18850        };
18851 
18852     /* Terms of order t^4 */
18853        final TERM s4[] = {
18854 
18855        /* 1-1 */
18856           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.26e-6,  -0.01e-6 )
18857        };
18858 
18859     /* Number of terms in the series */
18860        final int NS0 = s0.length;
18861        final int NS1 = s1.length;
18862        final int NS2 = s2.length;
18863        final int NS3 = s3.length;
18864        final int NS4 = s4.length;
18865 
18866     /*--------------------------------------------------------------------*/
18867 
18868     /* Interval between fundamental epoch J2000.0 and current date (JC). */
18869        t = ((date1 - DJ00) + date2) / DJC;
18870 
18871     /* Fundamental Arguments (from IERS Conventions 2003) */
18872 
18873     /* Mean anomaly of the Moon. */
18874        fa[0] = jauFal03(t);
18875 
18876     /* Mean anomaly of the Sun. */
18877        fa[1] = jauFalp03(t);
18878 
18879     /* Mean longitude of the Moon minus that of the ascending node. */
18880        fa[2] = jauFaf03(t);
18881 
18882     /* Mean elongation of the Moon from the Sun. */
18883        fa[3] = jauFad03(t);
18884 
18885     /* Mean longitude of the ascending node of the Moon. */
18886        fa[4] = jauFaom03(t);
18887 
18888     /* Mean longitude of Venus. */
18889        fa[5] = jauFave03(t);
18890 
18891     /* Mean longitude of Earth. */
18892        fa[6] = jauFae03(t);
18893 
18894     /* General precession in longitude. */
18895        fa[7] = jauFapa03(t);
18896 
18897     /* Evaluate s. */
18898        w0 = sp[0];
18899        w1 = sp[1];
18900        w2 = sp[2];
18901        w3 = sp[3];
18902        w4 = sp[4];
18903        w5 = sp[5];
18904 
18905        for (i = NS0-1; i >= 0; i--) {
18906        a = 0.0;
18907        for (j = 0; j < 8; j++) {
18908           a += (double)s0[i].nfa[j] * fa[j];
18909        }
18910        w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18911        }
18912 
18913        for (i = NS1-1; i >= 0; i--) {
18914           a = 0.0;
18915           for (j = 0; j < 8; j++) {
18916              a += (double)s1[i].nfa[j] * fa[j];
18917           }
18918           w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18919        }
18920 
18921        for (i = NS2-1; i >= 0; i--) {
18922           a = 0.0;
18923           for (j = 0; j < 8; j++) {
18924              a += (double)s2[i].nfa[j] * fa[j];
18925           }
18926           w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18927        }
18928 
18929        for (i = NS3-1; i >= 0; i--) {
18930           a = 0.0;
18931           for (j = 0; j < 8; j++) {
18932              a += (double)s3[i].nfa[j] * fa[j];
18933           }
18934           w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18935        }
18936 
18937        for (i = NS4-1; i >= 0; i--) {
18938           a = 0.0;
18939           for (j = 0; j < 8; j++) {
18940              a += (double)s4[i].nfa[j] * fa[j];
18941           }
18942           w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18943        }
18944 
18945        s = (w0 +
18946            (w1 +
18947            (w2 +
18948            (w3 +
18949            (w4 +
18950             w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18951 
18952        return s;
18953 
18954         }
18955     
18956 
18957     /**
18958     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18959     *  the equator of the Celestial Intermediate Pole, using the IAU 2006
18960     *  precession and IAU 2000A nutation models.
18961     *
18962     *<p>This function is derived from the International Astronomical Union's
18963     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18964     *
18965     *<p>Status:  support function.
18966     *
18967     *<!-- Given: -->
18968     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18969     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18970     *
18971     * <!-- Returned (function value): -->
18972     *  @return double    the CIO locator s in radians (Note 2)
18973     *
18974     * <p>Notes:
18975     * <ol>
18976     *
18977     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18978     *     convenient way between the two arguments.  For example,
18979     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18980     *     among others:
18981     *<pre>
18982     *            date1          date2
18983     *
18984     *         2450123.7           0.0       (JD method)
18985     *         2451545.0       -1421.3       (J2000 method)
18986     *         2400000.5       50123.2       (MJD method)
18987     *         2450123.5           0.2       (date &amp; time method)
18988     *</pre>
18989     *     The JD method is the most natural and convenient to use in
18990     *     cases where the loss of several decimal digits of resolution
18991     *     is acceptable.  The J2000 method is best matched to the way
18992     *     the argument is handled internally and will deliver the
18993     *     optimum resolution.  The MJD method and the date &amp; time methods
18994     *     are both good compromises between resolution and convenience.
18995     *
18996     * <li> The CIO locator s is the difference between the right ascensions
18997     *     of the same point in two systems.  The two systems are the GCRS
18998     *     and the CIP,CIO, and the point is the ascending node of the
18999     *     CIP equator.  The CIO locator s remains a small fraction of
19000     *     1 arcsecond throughout 1900-2100.
19001     *
19002     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
19003     *     are the x and y components of the CIP unit vector;  this series is
19004     *     more compact than a direct series for s would be.  The present
19005     *     function uses the full IAU 2000A nutation model when predicting
19006     *     the CIP position.
19007     *</ol>
19008     *<p>Called:<ul>
19009     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
19010     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
19011     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
19012     * </ul>
19013     *<p>References:
19014     *
19015     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
19016     *     "Expressions for the Celestial Intermediate Pole and Celestial
19017     *     Ephemeris Origin consistent with the IAU 2000A precession-
19018     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
19019     *
19020     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
19021     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
19022     *
19023     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
19024     *
19025     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
19026     *     IERS Technical Note No. 32, BKG
19027     *
19028     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
19029     *
19030     *@version 2010 January 18
19031     *
19032     *  @since Release 20101201
19033     *
19034     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19035     */
19036     public static double jauS06a(double date1, double date2)
19037     {
19038        double rnpb[][] = new double[3][3], s;
19039 
19040 
19041     /* Bias-precession-nutation-matrix, IAU 20006/2000A. */
19042        rnpb = jauPnm06a(date1, date2);
19043 
19044     /* Extract the CIP coordinates. */
19045        CelestialIntermediatePole cip = jauBpn2xy(rnpb);
19046 
19047     /* Compute the CIO locator s, given the CIP coordinates. */
19048        s = jauS06(date1, date2, cip.x, cip.y);
19049 
19050        return s;
19051 
19052         }
19053     
19054 
19055     /**
19056     *  Convert spherical coordinates to Cartesian.
19057     *
19058     *<p>This function is derived from the International Astronomical Union's
19059     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19060     *
19061     *<p>Status:  vector/matrix support function.
19062     *
19063     *<!-- Given: -->
19064     *     @param theta     double        longitude angle (radians)
19065     *     @param phi       double        latitude angle (radians)
19066     *
19067     *<!-- Returned: -->
19068     *     @return c         double[3]      <u>returned</u> direction cosines
19069     *
19070     *@version 2008 October 28
19071     *
19072     *  @since Release 20101201
19073     *
19074     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19075     */
19076     public static double[] jauS2c(double theta, double phi )
19077     {
19078        double cp, c[] = new double[3];
19079 
19080 
19081        cp = cos(phi);
19082        c[0] = cos(theta) * cp;
19083        c[1] = sin(theta) * cp;
19084        c[2] = sin(phi);
19085 
19086        return c;
19087 
19088         }
19089     
19090 
19091     /**
19092     *  Convert spherical polar coordinates to p-vector.
19093     *
19094     *<p>This function is derived from the International Astronomical Union's
19095     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19096     *
19097     *<p>Status:  vector/matrix support function.
19098     *
19099     *<!-- Given: -->
19100     *     @param theta    double        longitude angle (radians)
19101     *     @param phi      double        latitude angle (radians)
19102     *     @param r        double        radial distance
19103     *
19104     *<!-- Returned: -->
19105     *     @return p        double[3]      <u>returned</u> Cartesian coordinates
19106     *
19107     *<p>Called:<ul>
19108     *     <li>{@link #jauS2c} spherical coordinates to unit vector
19109     *     <li>{@link #jauSxp} multiply p-vector by scalar
19110     * </ul>
19111     *@version 2008 May 11
19112     *
19113     *  @since Release 20101201
19114     *
19115     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19116     */
19117     public static double[] jauS2p(double theta, double phi, double r )
19118     {
19119        double p[];
19120        double u[] = new double[3];
19121 
19122 
19123        u = jauS2c(theta,phi);
19124        p = jauSxp(r,u);
19125 
19126        return p;
19127 
19128         }
19129     
19130 
19131     /**
19132     *  Convert position/velocity from spherical to Cartesian coordinates.
19133     *
19134     *<p>This function is derived from the International Astronomical Union's
19135     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19136     *
19137     *<p>Status:  vector/matrix support function.
19138     *
19139     *<!-- Given: -->
19140     *     @param theta     double           longitude angle (radians)
19141     *     @param phi       double           latitude angle (radians)
19142     *     @param r         double           radial distance
19143     *     @param td        double           rate of change of theta
19144     *     @param pd        double           rate of change of phi
19145     *     @param rd        double           rate of change of r
19146     *
19147     *<!-- Returned: -->
19148     *     @return pv        double[2][3]      <u>returned</u> pv-vector
19149     *
19150     *@version 2008 May 25
19151     *
19152     *  @since Release 20101201
19153     *
19154     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19155     */
19156     public static double[][] jauS2pv(double theta, double phi, double r,
19157                  double td, double pd, double rd)
19158     {
19159        double pv[][] = new double[2][3];
19160        double st, ct, sp, cp, rcp, x, y, rpd, w;
19161 
19162 
19163        st = sin(theta);
19164        ct = cos(theta);
19165        sp = sin(phi);
19166        cp = cos(phi);
19167        rcp = r * cp;
19168        x = rcp * ct;
19169        y = rcp * st;
19170        rpd = r * pd;
19171        w = rpd*sp - cp*rd;
19172 
19173        pv[0][0] = x;
19174        pv[0][1] = y;
19175        pv[0][2] = r * sp;
19176        pv[1][0] = -y*td - w*ct;
19177        pv[1][1] =  x*td - w*st;
19178        pv[1][2] = rpd*cp + sp*rd;
19179 
19180        return pv;
19181 
19182         }
19183     
19184 
19185     /**
19186     *  Multiply a pv-vector by two scalars.
19187     *
19188     *<p>This function is derived from the International Astronomical Union's
19189     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19190     *
19191     *<p>Status:  vector/matrix support function.
19192     *
19193     *<!-- Given: -->
19194     *     @param s1      double          scalar to multiply position component by
19195     *     @param s2      double          scalar to multiply velocity component by
19196     *     @param pv      double[2][3]    pv-vector
19197     *
19198     *<!-- Returned: -->
19199     *     @return spv     double[2][3]     <u>returned</u> pv-vector: p scaled by s1, v scaled by s2
19200     *
19201     *  Note:
19202     *     It is permissible for pv and spv to be the same array.
19203     *
19204     *<p>Called:<ul>
19205     *     <li>{@link #jauSxp} multiply p-vector by scalar
19206     * </ul>
19207     *@version 2008 October 28
19208     *
19209     *  @since Release 20101201
19210     *
19211     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19212     */
19213     public static double[][] jauS2xpv(double s1, double s2, double pv[][])
19214     {
19215         double spv[][] = new double[2][3];
19216         spv[0] = jauSxp(s1, pv[0]);
19217         spv[1] =jauSxp(s2, pv[1]);
19218 
19219        return spv;
19220 
19221         }
19222     
19223 
19224     /**
19225     *  Angular separation between two p-vectors.
19226     *
19227     *<p>This function is derived from the International Astronomical Union's
19228     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19229     *
19230     *<p>Status:  vector/matrix support function.
19231     *
19232     *<!-- Given: -->
19233     *     @param a       double[3]     first p-vector (not necessarily unit length)
19234     *     @param b       double[3]     second p-vector (not necessarily unit length)
19235     *
19236     * <!-- Returned (function value): -->
19237     *  @return double       angular separation (radians, always positive)
19238     *
19239     * <p>Notes:
19240     * <ol>
19241     *
19242     * <li> If either vector is null, a zero result is returned.
19243     *
19244     * <li> The angular separation is most simply formulated in terms of
19245     *     scalar product.  However, this gives poor accuracy for angles
19246     *     near zero and pi.  The present algorithm uses both cross product
19247     *     and dot product, to deliver full accuracy whatever the size of
19248     *     the angle.
19249     *</ol>
19250     *<p>Called:<ul>
19251     *     <li>{@link #jauPxp} vector product of two p-vectors
19252     *     <li>{@link #jauPm} modulus of p-vector
19253     *     <li>{@link #jauPdp} scalar product of two p-vectors
19254     * </ul>
19255     *@version 2008 May 22
19256     *
19257     *  @since Release 20101201
19258     *
19259     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19260     */
19261     public static double jauSepp(double a[] , double b[] )
19262     {
19263        double axb[] = new double[3], ss, cs, s;
19264 
19265 
19266     /* Sine of angle between the vectors, multiplied by the two moduli. */
19267        axb = jauPxp(a,b);
19268        ss = jauPm(axb);
19269 
19270     /* Cosine of the angle, multiplied by the two moduli. */
19271        cs = jauPdp(a, b);
19272 
19273     /* The angle. */
19274        s = ((ss != 0.0) || (cs != 0.0)) ? atan2(ss, cs) : 0.0;
19275 
19276        return s;
19277 
19278         }
19279     
19280 
19281     /**
19282     *  Angular separation between two sets of spherical coordinates.
19283     *
19284     *<p>This function is derived from the International Astronomical Union's
19285     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19286     *
19287     *<p>Status:  vector/matrix support function.
19288     *
19289     *<!-- Given: -->
19290     *     @param al      double        first longitude (radians)
19291     *     @param ap      double        first latitude (radians)
19292     *     @param bl      double        second longitude (radians)
19293     *     @param bp      double        second latitude (radians)
19294     *
19295     * <!-- Returned (function value): -->
19296     *  @return double       angular separation (radians)
19297     *
19298     *<p>Called:<ul>
19299     *     <li>{@link #jauS2c} spherical coordinates to unit vector
19300     *     <li>{@link #jauSepp} angular separation between two p-vectors
19301     * </ul>
19302     *@version 2008 May 16
19303     *
19304     *  @since Release 20101201
19305     *
19306     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19307     */
19308     public static double jauSeps(double al, double ap, double bl, double bp)
19309     {
19310        double ac[] = new double[3], bc[] = new double[3], s;
19311 
19312 
19313     /* Spherical to Cartesian. */
19314        ac = jauS2c(al,ap);
19315        bc = jauS2c(bl,bp);
19316 
19317     /* Angle between the vectors. */
19318        s = jauSepp(ac, bc);
19319 
19320        return s;
19321 
19322         }
19323     
19324 
19325     /**
19326     *  The TIO locator s', positioning the Terrestrial Intermediate Origin
19327     *  on the equator of the Celestial Intermediate Pole.
19328     *
19329     *<p>This function is derived from the International Astronomical Union's
19330     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19331     *
19332     *<p>Status:  canonical model.
19333     *
19334     *<!-- Given: -->
19335     *     @param date1 double TT as a 2-part Julian Date (Note 1)
19336     *     @param date2 double TT as a 2-part Julian Date (Note 1)
19337     *
19338     * <!-- Returned (function value): -->
19339     *  @return double    the TIO locator s' in radians (Note 2)
19340     *
19341     * <p>Notes:
19342     * <ol>
19343     *
19344     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
19345     *     convenient way between the two arguments.  For example,
19346     *     JD(TT)=2450123.7 could be expressed in any of these ways,
19347     *     among others:
19348     *<pre>
19349     *            date1          date2
19350     *
19351     *         2450123.7           0.0       (JD method)
19352     *         2451545.0       -1421.3       (J2000 method)
19353     *         2400000.5       50123.2       (MJD method)
19354     *         2450123.5           0.2       (date &amp; time method)
19355     *</pre>
19356     *     The JD method is the most natural and convenient to use in
19357     *     cases where the loss of several decimal digits of resolution
19358     *     is acceptable.  The J2000 method is best matched to the way
19359     *     the argument is handled internally and will deliver the
19360     *     optimum resolution.  The MJD method and the date &amp; time methods
19361     *     are both good compromises between resolution and convenience.
19362     *
19363     * <li> The TIO locator s' is obtained from polar motion observations by
19364     *     numerical integration, and so is in essence unpredictable.
19365     *     However, it is dominated by a secular drift of about
19366     *     47 microarcseconds per century, which is the approximation
19367     *     evaluated by the present function.
19368     *</ol>
19369     *<p>Reference:
19370     *
19371     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19372     *     IERS Technical Note No. 32, BKG (2004)
19373     *
19374     *@version 2008 May 24
19375     *
19376     *  @since Release 20101201
19377     *
19378     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19379     */
19380     public static double jauSp00(double date1, double date2)
19381     {
19382        double t, sp;
19383 
19384 
19385     /* Interval between fundamental epoch J2000.0 and current date (JC). */
19386        t = ((date1 - DJ00) + date2) / DJC;
19387 
19388     /* Approximate s'. */
19389        sp = -47e-6 * t * DAS2R;
19390 
19391        return sp;
19392 
19393         }
19394     
19395 
19396     /**
19397     *  Star proper motion:  update star catalog data for space motion.
19398     *
19399     *<p>This function is derived from the International Astronomical Union's
19400     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19401     *
19402     *<p>Status:  support function.
19403     *
19404     *<!-- Given: -->
19405     *     @param ra1     double      right ascension (radians), before
19406     *     @param dec1    double      declination (radians), before
19407     *     @param pmr1    double      RA proper motion (radians/year), before
19408     *     @param pmd1    double      Dec proper motion (radians/year), before
19409     *     @param px1     double      parallax (arcseconds), before
19410     *     @param rv1     double      radial velocity (km/s, +ve = receding), before
19411     *     @param ep1a    double      "before" epoch, part A (Note 1)
19412     *     @param ep1b    double      "before" epoch, part B (Note 1)
19413     *     @param ep2a    double      "after" epoch, part A (Note 1)
19414     *     @param ep2b    double      "after" epoch, part B (Note 1)
19415     *
19416     *<!-- Returned: -->
19417     *     @return ra2     double       <u>returned</u> right ascension (radians), after
19418     *             dec2    double       <u>returned</u> declination (radians), after
19419     *             pmr2    double       <u>returned</u> RA proper motion (radians/year), after
19420     *             pmd2    double       <u>returned</u> Dec proper motion (radians/year), after
19421     *             px2     double       <u>returned</u> parallax (arcseconds), after
19422     *             rv2     double       <u>returned</u> radial velocity (km/s, +ve = receding), after
19423     *
19424     * <!-- Returned (function value): -->
19425     *  @return int        status:
19426     *                          -1 = system error (should not occur)
19427     *                           0 = no warnings or errors
19428     *                           1 = distance overridden (Note 6)
19429     *                           2 = excessive velocity (Note 7)
19430     *                           4 = solution didn't converge (Note 8)
19431     *                        else = binary logical OR of the above warnings
19432     *FIXME need to return the status as well.
19433     * <p>Notes:
19434     * <ol>
19435     *
19436     * <li> The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are
19437     *     Julian Dates, apportioned in any convenient way between the two
19438     *     parts (A and B).  For example, JD(TDB)=2450123.7 could be
19439     *     expressed in any of these ways, among others:
19440     *<pre>
19441     *             epna          epnb
19442     *
19443     *         2450123.7           0.0       (JD method)
19444     *         2451545.0       -1421.3       (J2000 method)
19445     *         2400000.5       50123.2       (MJD method)
19446     *         2450123.5           0.2       (date &amp; time method)
19447     *</pre>
19448     *     The JD method is the most natural and convenient to use in
19449     *     cases where the loss of several decimal digits of resolution
19450     *     is acceptable.  The J2000 method is best matched to the way
19451     *     the argument is handled internally and will deliver the
19452     *     optimum resolution.  The MJD method and the date &amp; time methods
19453     *     are both good compromises between resolution and convenience.
19454     *
19455     * <li> In accordance with normal star-catalog conventions, the object's
19456     *     right ascension and declination are freed from the effects of
19457     *     secular aberration.  The frame, which is aligned to the catalog
19458     *     equator and equinox, is Lorentzian and centered on the SSB.
19459     *
19460     *     The proper motions are the rate of change of the right ascension
19461     *     and declination at the catalog epoch and are in radians per TDB
19462     *     Julian year.
19463     *
19464     *     The parallax and radial velocity are in the same frame.
19465     *
19466     * <li> Care is needed with units.  The star coordinates are in radians
19467     *     and the proper motions in radians per Julian year, but the
19468     *     parallax is in arcseconds.
19469     *
19470     * <li> The RA proper motion is in terms of coordinate angle, not true
19471     *     angle.  If the catalog uses arcseconds for both RA and Dec proper
19472     *     motions, the RA proper motion will need to be divided by cos(Dec)
19473     *     before use.
19474     *
19475     * <li> Straight-line motion at constant speed, in the inertial frame,
19476     *     is assumed.
19477     *
19478     * <li> An extremely small (or zero or negative) parallax is interpreted
19479     *     to mean that the object is on the "celestial sphere", the radius
19480     *     of which is an arbitrary (large) value (see the jauStarpv
19481     *     function for the value used).  When the distance is overridden in
19482     *     this way, the status, initially zero, has 1 added to it.
19483     *
19484     * <li> If the space velocity is a significant fraction of c (see the
19485     *     constant VMAX in the function jauStarpv),  it is arbitrarily set
19486     *     to zero.  When this action occurs, 2 is added to the status.
19487     *
19488     * <li> The relativistic adjustment carried out in the jauStarpv function
19489     *     involves an iterative calculation.  If the process fails to
19490     *     converge within a set number of iterations, 4 is added to the
19491     *     status.
19492     *</ol>
19493     *<p>Called:<ul>
19494     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
19495     *     <li>{@link #jauPvu} update a pv-vector
19496     *     <li>{@link #jauPdp} scalar product of two p-vectors
19497     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
19498     * </ul>
19499     *@version 2008 May 16
19500     *
19501     *  @since Release 20101201
19502     *
19503     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19504     */
19505     public static CatalogCoords jauStarpm(double ra1, double dec1,
19506                   double pmr1, double pmd1, double px1, double rv1,
19507                   double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
19508     {
19509        double pv1[][] = new double[2][3], tl1, dt, pv[][] = new double[2][3], r2, rdv, v2, c2mv2, tl2,
19510               pv2[][] = new double[2][3];
19511        jauStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1);
19512 
19513     /* Light time when observed (days). */
19514        tl1 = jauPm(pv1[0]) / DC;
19515 
19516     /* Time interval, "before" to "after" (days). */
19517        dt = (ep2a - ep1a) + (ep2b - ep1b);
19518 
19519     /* Move star along track from the "before" observed position to the */
19520     /* "after" geometric position. */
19521        pv = jauPvu(dt + tl1, pv1);
19522 
19523     /* From this geometric position, deduce the observed light time (days) */
19524     /* at the "after" epoch (with theoretically unneccessary error check). */
19525        r2 = jauPdp(pv[0], pv[0]);
19526        rdv = jauPdp(pv[0], pv[1]);
19527        v2 = jauPdp(pv[1], pv[1]);
19528        c2mv2 = DC*DC - v2;
19529        if (c2mv2 <=  0) throw new JSOFAInternalError("internal error", -1);
19530        tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2;
19531 
19532     /* Move the position along track from the observed place at the */
19533     /* "before" epoch to the observed place at the "after" epoch. */
19534        pv2 =jauPvu(dt + (tl1 - tl2), pv1 );
19535 
19536     /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */
19537        CatalogCoords cat = jauPvstar(pv2);
19538 
19539        return cat;
19540 
19541         }
19542     
19543 
19544     /**
19545     *  Convert star catalog coordinates to position+velocity vector.
19546     *
19547     *<p>This function is derived from the International Astronomical Union's
19548     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19549     *
19550     *<p>Status:  support function.
19551     *
19552     *  Given (Note 1):
19553     *     ra     double        right ascension (radians)
19554     *     dec    double        declination (radians)
19555     *     pmr    double        RA proper motion (radians/year)
19556     *     pmd    double        Dec proper motion (radians/year)
19557     *     px     double        parallax (arcseconds)
19558     *     rv     double        radial velocity (km/s, positive = receding)
19559     *
19560     *  Returned (Note 2):
19561     *     pv     double[2][3]  pv-vector (au, au/day)
19562     *
19563     * <!-- Returned (function value): -->
19564     *  @return int           status:
19565     *                              0 = no warnings
19566     *                              1 = distance overridden (Note 6)
19567     *                              2 = excessive speed (Note 7)
19568     *                              4 = solution didn't converge (Note 8)
19569     *                           else = binary logical OR of the above
19570     *
19571     * <p>Notes:
19572     * <ol>
19573     *
19574     * <li> The star data accepted by this function are "observables" for an
19575     *     imaginary observer at the solar-system barycenter.  Proper motion
19576     *     and radial velocity are, strictly, in terms of barycentric
19577     *     coordinate time, TCB.  For most practical applications, it is
19578     *     permissible to neglect the distinction between TCB and ordinary
19579     *     "proper" time on Earth (TT/TAI).  The result will, as a rule, be
19580     *     limited by the intrinsic accuracy of the proper-motion and
19581     *     radial-velocity data;  moreover, the pv-vector is likely to be
19582     *     merely an intermediate result, so that a change of time unit
19583     *     would cancel out overall.
19584     *
19585     *     In accordance with normal star-catalog conventions, the object's
19586     *     right ascension and declination are freed from the effects of
19587     *     secular aberration.  The frame, which is aligned to the catalog
19588     *     equator and equinox, is Lorentzian and centered on the SSB.
19589     *
19590     * <li> The resulting position and velocity pv-vector is with respect to
19591     *     the same frame and, like the catalog coordinates, is freed from
19592     *     the effects of secular aberration.  Should the "coordinate
19593     *     direction", where the object was located at the catalog epoch, be
19594     *     required, it may be obtained by calculating the magnitude of the
19595     *     position vector pv[0][0-2] dividing by the speed of light in
19596     *     au/day to give the light-time, and then multiplying the space
19597     *     velocity pv[1][0-2] by this light-time and adding the result to
19598     *     pv[0][0-2].
19599     *
19600     *     Summarizing, the pv-vector returned is for most stars almost
19601     *     identical to the result of applying the standard geometrical
19602     *     "space motion" transformation.  The differences, which are the
19603     *     subject of the Stumpff paper referenced below, are:
19604     *
19605     *     (i) In stars with significant radial velocity and proper motion,
19606     *     the constantly changing light-time distorts the apparent proper
19607     *     motion.  Note that this is a classical, not a relativistic,
19608     *     effect.
19609     *
19610     *     (ii) The transformation complies with special relativity.
19611     *
19612     * <li> Care is needed with units.  The star coordinates are in radians
19613     *     and the proper motions in radians per Julian year, but the
19614     *     parallax is in arcseconds; the radial velocity is in km/s, but
19615     *     the pv-vector result is in au and au/day.
19616     *
19617     * <li> The RA proper motion is in terms of coordinate angle, not true
19618     *     angle.  If the catalog uses arcseconds for both RA and Dec proper
19619     *     motions, the RA proper motion will need to be divided by cos(Dec)
19620     *     before use.
19621     *
19622     * <li> Straight-line motion at constant speed, in the inertial frame,
19623     *     is assumed.
19624     *
19625     * <li> An extremely small (or zero or negative) parallax is interpreted
19626     *     to mean that the object is on the "celestial sphere", the radius
19627     *     of which is an arbitrary (large) value (see the constant PXMIN).
19628     *     When the distance is overridden in this way, the status,
19629     *     initially zero, has 1 added to it.
19630     *
19631     * <li> If the space velocity is a significant fraction of c (see the
19632     *     constant VMAX), it is arbitrarily set to zero.  When this action
19633     *     occurs, 2 is added to the status.
19634     *
19635     * <li> The relativistic adjustment involves an iterative calculation.
19636     *     If the process fails to converge within a set number (IMAX) of
19637     *     iterations, 4 is added to the status.
19638     *
19639     * <li> The inverse transformation is performed by the function
19640     *     jauPvstar.
19641     *</ol>
19642     *<p>Called:<ul>
19643     *     <li>{@link #jauS2pv} spherical coordinates to pv-vector
19644     *     <li>{@link #jauPm} modulus of p-vector
19645     *     <li>{@link #jauZp} zero p-vector
19646     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
19647     *     <li>{@link #jauPdp} scalar product of two p-vectors
19648     *     <li>{@link #jauSxp} multiply p-vector by scalar
19649     *     <li>{@link #jauPmp} p-vector minus p-vector
19650     *     <li>{@link #jauPpp} p-vector plus p-vector
19651     * </ul>
19652     *<p>Reference:
19653     *
19654     *     Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
19655     *
19656     *@version 2009 July 6
19657     *
19658     *  @since Release 20101201
19659     *
19660     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19661     */
19662     public static int jauStarpv(double ra, double dec,
19663                   double pmr, double pmd, double px, double rv,
19664                   double pv[][])
19665     {
19666     /* Smallest allowed parallax */
19667        final double PXMIN = 1e-7;
19668 
19669     /* Largest allowed speed (fraction of c) */
19670        final double VMAX = 0.5;
19671 
19672     /* Maximum number of iterations for relativistic solution */
19673        final int IMAX = 100;
19674 
19675        int i, iwarn;
19676        double w, r, rd, rad, decd, v, x[] = new double[3], usr[] = new double[3], ust[] = new double[3],
19677               vsr, vst, betst, betsr, bett, betr,
19678               dd, ddel, ur[] = new double[3], ut[] = new double[3],
19679               d = 0.0, del = 0.0,       /* to prevent */
19680               odd = 0.0, oddel = 0.0,   /* compiler   */
19681               od = 0.0, odel = 0.0;     /* warnings   */
19682 
19683 
19684     /* Distance (au). */
19685        if (px >= PXMIN) {
19686           w = px;
19687           iwarn = 0;
19688        } else {
19689           w = PXMIN;
19690           iwarn = 1;
19691        }
19692        r = DR2AS / w;
19693 
19694     /* Radial velocity (au/day). */
19695        rd = DAYSEC * rv * 1e3 / DAU;
19696 
19697     /* Proper motion (radian/day). */
19698        rad = pmr / DJY;
19699        decd = pmd / DJY;
19700 
19701     /* To pv-vector (au,au/day). */
19702        double[][] pvt = jauS2pv(ra, dec, r, rad, decd, rd);
19703        jauCpv(pvt,pv);
19704 
19705     /* If excessive velocity, arbitrarily set it to zero. */
19706        v = jauPm(pv[1]);
19707        if (v / DC > VMAX) {
19708           jauZp(pv[1]);
19709           iwarn += 2;
19710        }
19711 
19712     /* Isolate the radial component of the velocity (au/day). */
19713        NormalizedVector nv = jauPn(pv[0]);
19714        w = nv.r;
19715        x = nv.u;
19716        vsr = jauPdp(x, pv[1]);
19717        usr = jauSxp(vsr,x);
19718 
19719     /* Isolate the transverse component of the velocity (au/day). */
19720        ust = jauPmp(pv[1], usr);
19721        vst = jauPm(ust);
19722 
19723     /* Special-relativity dimensionless parameters. */
19724        betsr = vsr / DC;
19725        betst = vst / DC;
19726 
19727     /* Determine the inertial-to-observed relativistic correction terms. */
19728        bett = betst;
19729        betr = betsr;
19730        for (i = 0; i < IMAX; i++) {
19731           d = 1.0 + betr;
19732           del = sqrt(1.0 - betr*betr - bett*bett) - 1.0;
19733           betr = d * betsr + del;
19734           bett = d * betst;
19735           if (i > 0) {
19736              dd = abs(d - od);
19737              ddel = abs(del - odel);
19738              if ((i > 1) && (dd >= odd) && (ddel >= oddel)) break;
19739              odd = dd;
19740              oddel = ddel;
19741           }
19742           od = d;
19743           odel = del;
19744        }
19745        if (i >= IMAX) iwarn += 4;
19746 
19747     /* Replace observed radial velocity with inertial value. */
19748        w = (betsr != 0.0) ? d + del / betsr : 1.0;
19749        ur = jauSxp(w,usr);
19750 
19751     /* Replace observed tangential velocity with inertial value. */
19752        ut = jauSxp(d,ust);
19753 
19754     /* Combine the two to obtain the inertial space velocity. */
19755        pv[1] = jauPpp(ur, ut);
19756        
19757     /* Return the status. */
19758        return iwarn;
19759 
19760         }
19761     
19762 
19763     /**
19764     *  Multiply a p-vector by a scalar.
19765     *
19766     *<p>This function is derived from the International Astronomical Union's
19767     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19768     *
19769     *<p>Status:  vector/matrix support function.
19770     *
19771     *<!-- Given: -->
19772     *     @param s       double         scalar
19773     *     @param p       double[3]      p-vector
19774     *
19775     *<!-- Returned: -->
19776     *     @return sp      double[3]       <u>returned</u> s * p
19777     *
19778     * 
19779     *
19780     *@version 2008 October 28
19781     *
19782     *  @since Release 20101201
19783     *
19784     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19785     */
19786     public static  double[] jauSxp(double s, double p[])
19787     {
19788        double sp[] = new double[3];
19789        sp[0] = s * p[0];
19790        sp[1] = s * p[1];
19791        sp[2] = s * p[2];
19792 
19793        return sp;
19794 
19795         }
19796     
19797 
19798     /**
19799     *  Multiply a pv-vector by a scalar.
19800     *
19801     *<p>This function is derived from the International Astronomical Union's
19802     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19803     *
19804     *<p>Status:  vector/matrix support function.
19805     *
19806     *<!-- Given: -->
19807     *     @param s        double           scalar
19808     *     @param pv       double[2][3]     pv-vector
19809     *
19810     *<!-- Returned: -->
19811     *     @return spv      double[2][3]      <u>returned</u> s * pv
19812     *
19813     *  Note:
19814     *     It is permissible for pv and psv to be the same array
19815     *
19816     *<p>Called:<ul>
19817     *     <li>{@link #jauS2xpv} multiply pv-vector by two scalars
19818     * </ul>
19819     *@version 2008 October 28
19820     *
19821     *  @since Release 20101201
19822     *
19823     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19824     */
19825     public static double[][] jauSxpv(double s, double pv[][])
19826     {
19827         double spv[][];
19828         spv = jauS2xpv(s, s, pv);
19829 
19830        return spv;
19831 
19832         }
19833 
19834     /**
19835      *
19836      *  Time scale transformation:  International Atomic Time, TAI, to
19837      *  Terrestrial Time, TT.
19838      *
19839      * <p>This function is derived from the International Astronomical Union's
19840      *  SOFA (Standards of Fundamental Astronomy) software collection.
19841      *
19842      *<p>Status:  canonical.
19843      *
19844      *<!-- Given: -->
19845      *  @param tai1 double    TAI as a 2-part Julian Date
19846      *  @param tai2 double    TAI as a 2-part Julian Date 
19847      *
19848      *<!-- Returned:-->
19849      *     @return JulianDate   TT as a 2-part Julian Date
19850      *
19851      *
19852      *  Note:
19853      *
19854      *     tai1+tai2 is Julian Date, apportioned in any convenient way
19855      *     between the two arguments, for example where tai1 is the Julian
19856      *     Day Number and tai2 is the fraction of a day.  The returned
19857      *     tt1,tt2 follow suit.
19858      *
19859      *<p>References:
19860      *
19861      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19862      *     IERS Technical Note No. 32, BKG (2004)
19863      *
19864      *     Explanatory Supplement to the Astronomical Almanac,
19865      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
19866      *
19867      *@version 2010 May 16
19868      *
19869      *@since SOFA release 2010-12-01
19870      *
19871      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
19872      */
19873     public static JulianDate jauTaitt(double tai1, double tai2)
19874     {
19875 
19876         double tt1, tt2;
19877         /* TT minus TAI (days). */
19878         final double dtat = TTMTAI / DAYSEC;
19879 
19880         /* Result, safeguarding precision. */
19881         
19882         if ( tai1 > tai2 ) {
19883             tt1 = tai1;
19884             tt2 = tai2 + dtat;
19885         } else {
19886             tt1 = tai1 + dtat;
19887             tt2 = tai2;
19888         }
19889 
19890 
19891         return new JulianDate(tt1, tt2);
19892     };   
19893 
19894     /**
19895      *
19896      *  Time scale transformation:  International Atomic Time, TAI, to
19897      *  Universal Time, UT1.
19898      *
19899      * <p>This function is derived from the International Astronomical Union's
19900      *  SOFA (Standards of Fundamental Astronomy) software collection.
19901      *
19902      *<p>Status:  canonical.
19903      *
19904      *<!-- Given: -->
19905      *  @param tai1 double    TAI as a 2-part Julian Date
19906      *  @param tai2 double    TAI as a 2-part Julian Date 
19907      *  @param   dta        double    UT1-TAI in seconds
19908      *
19909      *<!-- Returned:-->
19910      *  @return      UT1 as a 2-part Julian Date
19911      *
19912      *
19913      *<p>Notes:
19914      *  <ol>
19915      * <li>  tai1+tai2 is Julian Date, apportioned in any convenient way
19916      *     between the two arguments, for example where tai1 is the Julian
19917      *     Day Number and tai2 is the fraction of a day.  The returned
19918      *     UT11,UT12 follow suit.
19919      *
19920      *  <li>  The argument dta, i.e. UT1-TAI, is an observed quantity, and is
19921      *     available from IERS tabulations.
19922      *  </ol>
19923      *  Reference:
19924      *
19925      *     Explanatory Supplement to the Astronomical Almanac,
19926      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
19927      *
19928      *@version 2010 May 16
19929      *
19930      *@since SOFA release 2010-12-01
19931      *
19932      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
19933      *
19934      */
19935     public static JulianDate jauTaiut1(double tai1, double tai2, double dta)
19936 
19937     {
19938         double dtad,ut11, ut12;
19939 
19940 
19941         /* Result, safeguarding precision. */
19942         dtad = dta / DAYSEC;
19943         if ( tai1 > tai2 ) {
19944             ut11 = tai1;
19945             ut12 = tai2 + dtad;
19946         } else {
19947             ut11 = tai1 + dtad;
19948             ut12 = tai2;
19949         }
19950 
19951         return new JulianDate(ut11, ut12);
19952     };   
19953 
19954     /**
19955      *
19956      *  Time scale transformation:  International Atomic Time, TAI, to
19957      *  Coordinated Universal Time, UTC.
19958      *
19959      * <p>This function is derived from the International Astronomical Union's
19960      *  SOFA (Standards of Fundamental Astronomy) software collection.
19961      *
19962      *<p>Status:  canonical.
19963      *
19964      *<!-- Given: -->
19965      *  @param tai1 TAI as a 2-part Julian Date (Note 1)
19966      *  @param tai2 TAI as a 2-part Julian Date (Note 1) 
19967      *
19968      *<!-- Returned:-->
19969      *  @return   UTC as a 2-part quasi Julian Date (Notes 1-3)
19970      *
19971      *  Returned (function value):
19972      *                int      status: +1 = dubious year (Note 4)
19973      *                                  0 = OK
19974      *                                 -1 = unacceptable date
19975      *
19976      *<p>Notes:</p>
19977      * <ol>
19978      * <li>  tai1+tai2 is Julian Date, apportioned in any convenient way
19979      *     between the two arguments, for example where tai1 is the Julian
19980      *     Day Number and tai2 is the fraction of a day.  The returned utc1
19981      *     and utc2 form an analogous pair, except that a special convention
19982      *     is used, to deal with the problem of leap seconds - see the next
19983      *     note.
19984      *
19985      *  <li> JD cannot unambiguously represent UTC during a leap second unless
19986      *     special measures are taken.  The convention in the present
19987      *     function is that the JD day represents UTC days whether the
19988      *     length is 86399, 86400 or 86401 SI seconds.
19989      *
19990      *  <li> The function jauD2dtf can be used to transform the UTC quasi-JD
19991      *     into calendar date and clock time, including UTC leap second
19992      *     handling.
19993      *
19994      *  <li> The warning status "dubious year" flags UTCs that predate the
19995      *     introduction of the time scale and that are too far in the future
19996      *     to be trusted.  See jauDat for further details.
19997      *  </ol>
19998      *  Called:
19999      *  <ul>
20000      *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
20001      *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
20002      *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
20003      *</ul>
20004      *<p>References:
20005      *
20006      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20007      *     IERS Technical Note No. 32, BKG (2004)
20008      *
20009      *     Explanatory Supplement to the Astronomical Almanac,
20010      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
20011      *
20012      *@version 2010 May 16
20013      *
20014      *@since SOFA release 2010-12-01
20015      *
20016      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20017      * @throws JSOFAIllegalParameter 
20018      * @throws JSOFAInternalError 
20019      */
20020     public static JulianDate jauTaiutc(double tai1, double tai2) throws JSOFAIllegalParameter, JSOFAInternalError
20021     {
20022         boolean big1;
20023         int i;
20024         double a1, a2,dats1, ddats, dats2, datd = 0.0, as1, as2, da, d1, d2, fd;
20025         double utc1, utc2;
20026 
20027 
20028         /* Put the two parts of the TAI into big-first order. */
20029         big1 = ( tai1 >= tai2 );
20030         if ( big1 ) {
20031             a1 = tai1;
20032             a2 = tai2;
20033         } else {
20034             a1 = tai2;
20035             a2 = tai1;
20036         }
20037 
20038         /* See if the TAI can possibly be in a leap-second day. */
20039         d1 = a1;
20040         dats1 = 0.0;
20041         for ( i = -1; i <= 3; i++ ) {
20042             d2 = a2 + (double) i;
20043             Calendar dt;
20044             dt = jauJd2cal(d1, d2 );
20045             dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
20046 //FIXME            if ( js < 0 ) return -1;
20047             if ( i == -1 ) dats1 = dats2;
20048             ddats = dats2 - dats1;
20049             datd = dats1 / DAYSEC;
20050             if ( abs(ddats) >= 0.5 ) {
20051 
20052                 /* Yes.  Get TAI for the start of the UTC day that */
20053                 /* ends in a leap. */
20054                 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
20055                 d1 = jd.djm0; d2 = jd.djm1;
20056                 as1 = d1;
20057                 as2 = d2 - 1.0 + datd;
20058 
20059                 /* Is the TAI after this point? */
20060                 da = a1 - as1;
20061                 da = da + ( a2 - as2 );
20062                 if ( da > 0 ) {
20063 
20064                     /* Yes:  fraction of the current UTC day that has elapsed. */
20065                     fd = da * DAYSEC / ( DAYSEC + ddats );
20066 
20067                     /* Ramp TAI-UTC to bring about SOFA's JD(UTC) convention. */
20068                     datd += ddats * ( fd <= 1.0 ? fd : 1.0 ) / DAYSEC;
20069                 }
20070 
20071                 /* Done. */
20072                 break;
20073             }
20074             dats1 = dats2;
20075         }
20076 
20077         /* Subtract the (possibly adjusted) TAI-UTC from TAI to give UTC. */
20078         a2 -= datd;
20079 
20080         /* Return the UTC result, preserving the TAI order. */
20081         if ( big1 ) {
20082             utc1 = a1;
20083             utc2 = a2;
20084         } else {
20085             utc1 = a2;
20086             utc2 = a1;
20087         }
20088 
20089         /* TODO Status */
20090         return new JulianDate(utc1, utc2);
20091 
20092     };
20093 
20094     /**
20095      *
20096      *  Time scale transformation:  Barycentric Coordinate Time, TCB, to
20097      *  Barycentric Dynamical Time, TDB.
20098      *
20099      * <p>This function is derived from the International Astronomical Union's
20100      *  SOFA (Standards of Fundamental Astronomy) software collection.
20101      *
20102      *<p>Status:  canonical.
20103      *
20104      *<!-- Given: -->
20105      *   @param tcb1 double    TCB as a 2-part Julian Date
20106      *   @param tcb2 double    TCB as a 2-part Julian Date 
20107      *
20108      *<!-- Returned:-->
20109      *   @return    TDB as a 2-part Julian Date
20110      *
20111      *
20112      *<p>Notes:
20113      *  <ol>
20114      * <li>  tcb1+tcb2 is Julian Date, apportioned in any convenient way
20115      *     between the two arguments, for example where tcb1 is the Julian
20116      *     Day Number and tcb2 is the fraction of a day.  The returned
20117      *     tdb1,tdb2 follow suit.
20118      *
20119      * <li>  The 2006 IAU General Assembly introduced a conventional linear
20120      *     transformation between TDB and TCB.  This transformation
20121      *     compensates for the drift between TCB and terrestrial time TT,
20122      *     and keeps TDB approximately centered on TT.  Because the
20123      *     relationship between TT and TCB depends on the adopted solar
20124      *     system ephemeris, the degree of alignment between TDB and TT over
20125      *     long intervals will vary according to which ephemeris is used.
20126      *     Former definitions of TDB attempted to avoid this problem by
20127      *     stipulating that TDB and TT should differ only by periodic
20128      *     effects.  This is a good description of the nature of the
20129      *     relationship but eluded precise mathematical formulation.  The
20130      *     conventional linear relationship adopted in 2006 sidestepped
20131      *     these difficulties whilst delivering a TDB that in practice was
20132      *     consistent with values before that date.
20133      *
20134      *  <li>  TDB is essentially the same as Teph, the time argument for the
20135      *     JPL solar system ephemerides.
20136      * </ol>
20137      *  Reference:
20138      *
20139      *     IAU 2006 Resolution B3
20140      *
20141      *@version 2010 May 16
20142      *
20143      *@since SOFA release 2010-12-01
20144      *
20145      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20146      */
20147     public static JulianDate jauTcbtdb(double tcb1, double tcb2)
20148     {
20149         double tdb1, tdb2;
20150         /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20151         final double t77td = DJM0 + DJM77;
20152         final double t77tf = TTMTAI/DAYSEC;
20153 
20154         /* TDB (days) at TAI 1977 Jan 1.0 */
20155         final double tdb0 = TDB0/86400.0;
20156 
20157         double d;
20158 
20159 
20160         /* Result, safeguarding precision. */
20161         if ( tcb1 > tcb2 ) {
20162             d = tcb1 - t77td;
20163             tdb1 = tcb1;
20164             tdb2 = tcb2 + tdb0 - ( d + ( tcb2 - t77tf ) ) * ELB;
20165         } else {
20166             d = tcb2 - t77td;
20167             tdb1 = tcb1 + tdb0 - ( d + ( tcb1 - t77tf ) ) * ELB;
20168             tdb2 = tcb2;
20169         }
20170 
20171 
20172         return new JulianDate(tdb1, tdb2);
20173 
20174     };
20175 
20176     /**
20177      *  Time scale transformation:  Geocentric Coordinate Time, TCG, to
20178      *  Terrestrial Time, TT.
20179      *
20180      * <p>This function is derived from the International Astronomical Union's
20181      *  SOFA (Standards of Fundamental Astronomy) software collection.
20182      *
20183      *<p>Status:  canonical.
20184      *
20185      *<!-- Given: -->
20186      *  @param tcg1 double    TCG as a 2-part Julian Date
20187      *  @param tcg2 double    TCG as a 2-part Julian Date 
20188      *
20189      *<!-- Returned:-->
20190      *   @return    TT as a 2-part Julian Date
20191      *
20192      *
20193      *  Note:
20194      *
20195      *     tcg1+tcg2 is Julian Date, apportioned in any convenient way
20196      *     between the two arguments, for example where tcg1 is the Julian
20197      *     Day Number and tcg22 is the fraction of a day.  The returned
20198      *     tt1,tt2 follow suit.
20199      *
20200      *<p>References:
20201      *
20202      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),.
20203      *     IERS Technical Note No. 32, BKG (2004)
20204      *
20205      *     IAU 2000 Resolution B1.9
20206      *
20207      *@version 2010 May 14
20208      *
20209      *@since SOFA release 2010-12-01
20210      *
20211      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20212      */
20213     public static JulianDate jauTcgtt(double tcg1, double tcg2)
20214     {
20215         double tt1,tt2;
20216         /* 1977 Jan 1 00:00:32.184 TT, as MJD */
20217         final double t77t = DJM77 + TTMTAI/DAYSEC;
20218 
20219 
20220         /* Result, safeguarding precision. */
20221         if ( tcg1 > tcg2 ) {
20222             tt1 = tcg1;
20223             tt2 = tcg2 - ( ( tcg1 - DJM0 ) + ( tcg2 - t77t ) ) * ELG;
20224         } else {
20225             tt1 = tcg1 - ( ( tcg2 - DJM0 ) + ( tcg1 - t77t ) ) * ELG;
20226             tt2 = tcg2;
20227         }
20228 
20229         return new JulianDate(tt1, tt2);
20230     };
20231 
20232 
20233     /**
20234      *
20235      *  Time scale transformation:  Barycentric Dynamical Time, TDB, to
20236      *  Barycentric Coordinate Time, TCB.
20237      *
20238      * <p>This function is derived from the International Astronomical Union's
20239      *  SOFA (Standards of Fundamental Astronomy) software collection.
20240      *
20241      *<p>Status:  canonical.
20242      *
20243      *<!-- Given: -->
20244      *   @param tdb1 TDB as a 2-part Julian Date
20245      *   @param tdb2 TDB as a 2-part Julian Date 
20246      *
20247      *<!-- Returned:-->
20248      *   @return    TCB as a 2-part Julian Date
20249      *
20250      *<p>Notes:
20251      * <ol>
20252      *  <li>  tdb1+tdb2 is Julian Date, apportioned in any convenient way
20253      *     between the two arguments, for example where tdb1 is the Julian
20254      *     Day Number and tdb2 is the fraction of a day.  The returned
20255      *     tcb1,tcb2 follow suit.
20256      *
20257      *  <li> The 2006 IAU General Assembly introduced a conventional linear
20258      *     transformation between TDB and TCB.  This transformation
20259      *     compensates for the drift between TCB and terrestrial time TT,
20260      *     and keeps TDB approximately centered on TT.  Because the
20261      *     relationship between TT and TCB depends on the adopted solar
20262      *     system ephemeris, the degree of alignment between TDB and TT over
20263      *     long intervals will vary according to which ephemeris is used.
20264      *     Former definitions of TDB attempted to avoid this problem by
20265      *     stipulating that TDB and TT should differ only by periodic
20266      *     effects.  This is a good description of the nature of the
20267      *     relationship but eluded precise mathematical formulation.  The
20268      *     conventional linear relationship adopted in 2006 sidestepped
20269      *     these difficulties whilst delivering a TDB that in practice was
20270      *     consistent with values before that date.
20271      *
20272      * <li>  TDB is essentially the same as Teph, the time argument for the
20273      *     JPL solar system ephemerides.
20274      *  </ol>
20275      *  Reference:
20276      *
20277      *     IAU 2006 Resolution B3
20278      *
20279      *@version 2010 September 10
20280      *
20281      *@since SOFA release 2010-12-01
20282      *
20283      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20284      */
20285     public static JulianDate jauTdbtcb(double tdb1, double tdb2 )
20286     {
20287         double tcb1, tcb2;
20288         /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20289         final double t77td = DJM0 + DJM77;
20290         final double t77tf = TTMTAI/DAYSEC;
20291 
20292         /* TDB (days) at TAI 1977 Jan 1.0 */
20293         final double tdb0 = TDB0/DAYSEC;
20294 
20295         /* TDB to TCB rate */
20296         final double elbb = ELB/(1.0-ELB);
20297 
20298         double d, f;
20299 
20300 
20301         /* Result, preserving date format but safeguarding precision. */
20302         if ( tdb1 > tdb2 ) {
20303             d = t77td - tdb1;
20304             f  = tdb2 - tdb0;
20305             tcb1 = tdb1;
20306             tcb2 = f - ( d - ( f - t77tf ) ) * elbb;
20307         } else {
20308             d = t77td - tdb2;
20309             f  = tdb1 - tdb0;
20310             tcb1 = f + ( d - ( f - t77tf ) ) * elbb;
20311             tcb2 = tdb2;
20312         }
20313 
20314         return new JulianDate(tcb1, tcb2);
20315 
20316     };
20317 
20318 
20319     /**
20320      *
20321      *  Time scale transformation:  Barycentric Dynamical Time, TDB, to
20322      *  Terrestrial Time, TT.
20323      *
20324      * <p>This function is derived from the International Astronomical Union's
20325      *  SOFA (Standards of Fundamental Astronomy) software collection.
20326      *
20327      *<p>Status:  canonical.
20328      *
20329      *<!-- Given: -->
20330      *    @param tdb1 double    TDB as a 2-part Julian Date
20331      *    @param tdb2 double    TDB as a 2-part Julian Date 
20332      *    @param dtr        double    TDB-TT in seconds
20333      *
20334      *<!-- Returned:-->
20335      *   @return   TT as a 2-part Julian Date
20336      *
20337      *
20338      *<p>Notes:
20339      * <ol>
20340      * <li>  tdb1+tdb2 is Julian Date, apportioned in any convenient way
20341      *     between the two arguments, for example where tdb1 is the Julian
20342      *     Day Number and tdb2 is the fraction of a day.  The returned
20343      *     tt1,tt2 follow suit.
20344      *
20345      *  <li>  The argument dtr represents the quasi-periodic component of the
20346      *     GR transformation between TT and TCB.  It is dependent upon the
20347      *     adopted solar-system ephemeris, and can be obtained by numerical
20348      *     integration, by interrogating a precomputed time ephemeris or by
20349      *     evaluating a model such as that implemented in the SOFA function
20350      *     jauDtdb.   The quantity is dominated by an annual term of 1.7 ms
20351      *     amplitude.
20352      *
20353      *  <li>  TDB is essentially the same as Teph, the time argument for the
20354      *     JPL solar system ephemerides.
20355      *  </ol>
20356      *<p>References:
20357      *
20358      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20359      *     IERS Technical Note No. 32, BKG (2004)
20360      *
20361      *     IAU 2006 Resolution 3
20362      *
20363      *@version 2010 May 13
20364      *
20365      *@since SOFA release 2010-12-01
20366      *
20367      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20368      *
20369      */
20370     public static JulianDate jauTdbtt(double tdb1, double tdb2, double dtr  )
20371     {
20372         double tt1, tt2;
20373         double dtrd;
20374 
20375 
20376         /* Result, safeguarding precision. */
20377         dtrd = dtr / DAYSEC;
20378         if ( tdb1 > tdb2 ) {
20379             tt1 = tdb1;
20380             tt2 = tdb2 - dtrd;
20381         } else {
20382             tt1 = tdb1 - dtrd;
20383             tt2 = tdb2;
20384         }
20385 
20386         return new JulianDate(tt1, tt2);
20387 
20388     }
20389 
20390     /**
20391      *
20392      *  Convert hours, minutes, seconds to radians.
20393      *
20394      * <p>This function is derived from the International Astronomical Union's
20395      *  SOFA (Standards of Fundamental Astronomy) software collection.
20396      *
20397      *<p>Status:  support function.
20398      *
20399      *<!-- Given: -->
20400      *     @param s         char     sign:  '-' = negative, otherwise positive
20401      *     @param ihour     int     hours
20402      *     @param imin      int     minutes
20403      *     @param sec       double  seconds
20404      *
20405      *<!-- Returned:-->
20406      *     @return      double  angle in radians
20407      *@throws JSOFAIllegalParameter illegal parameter of some form
20408      *  Returned (function value):
20409      *               int     status:  0 = OK
20410      *                                1 = ihour outside range 0-23
20411      *                                2 = imin outside range 0-59
20412      *                                3 = sec outside range 0-59.999...
20413      *
20414      *<p>Notes:
20415      *<ul>
20416      *  <li>  The result is computed even if any of the range checks fail.
20417      *
20418      *  <li>  Negative ihour, imin and/or sec produce a warning status, but
20419      *      the absolute value is used in the conversion.
20420      *</ul>
20421      *@version 2010 August 27
20422      *
20423      *@since SOFA release 2010-12-01
20424      *
20425      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20426      * 
20427      */
20428     public static double jauTf2a(char s, int ihour, int imin, double sec ) throws JSOFAIllegalParameter
20429     {
20430         double rad;
20431 
20432         /* Compute the interval. */
20433         rad  = ( s == '-' ? -1.0 : 1.0 ) *
20434                 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20435                         ( (double) abs(imin) ) ) +
20436                         abs(sec) ) * DS2R;
20437 
20438         /*  Validate arguments and return status. */
20439         if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);   
20440         if ( imin < 0 || imin > 59 )   throw new JSOFAIllegalParameter("bad minute", 2); 
20441         if ( sec < 0.0 || sec >= 60.0 )throw new JSOFAIllegalParameter("bad second", 3); 
20442         return rad;
20443 
20444     };
20445 
20446     /**
20447      *
20448      *  Convert hours, minutes, seconds to days.
20449      *
20450      * <p>This function is derived from the International Astronomical Union's
20451      *  SOFA (Standards of Fundamental Astronomy) software collection.
20452      *
20453      *<p>Status:  support function.
20454      *
20455      *<!-- Given: -->
20456      *     @param s         char     sign:  '-' = negative, otherwise positive
20457      *     @param ihour     int     hours
20458      *     @param imin      int     minutes
20459      *     @param sec       double  seconds
20460      *
20461      *<!-- Returned:-->
20462      *     days      double  interval in days
20463      *
20464      *  Returned (function value):
20465      *               int     status:  0 = OK
20466      *                                1 = ihour outside range 0-23
20467      *                                2 = imin outside range 0-59
20468      *                                3 = sec outside range 0-59.999...
20469      *
20470      *<p>Notes:
20471      *<ol>
20472      *  <li>  The result is computed even if any of the range checks fail.
20473      *
20474      *  <li>  Negative ihour, imin and/or sec produce a warning status, but
20475      *      the absolute value is used in the conversion.
20476      *</ol>
20477      *@version 2010 August 27
20478      *
20479      *@since SOFA release 2010-12-01
20480      *
20481      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20482      * @throws JSOFAIllegalParameter 
20483      */
20484     public static double jauTf2d(char s, int ihour, int imin, double sec) throws JSOFAIllegalParameter
20485     {
20486         double days;
20487         /* Compute the interval. */
20488         days  = ( s == '-' ? -1.0 : 1.0 ) *
20489                 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20490                         ( (double) abs(imin) ) ) +
20491                         abs(sec) ) / DAYSEC;
20492 
20493         /* FIXME Validate arguments and return status. */
20494         if ( ihour < 0 || ihour > 23 )  throw new JSOFAIllegalParameter("bad hour", 1);
20495         if ( imin < 0 || imin > 59 )    throw new JSOFAIllegalParameter("bad minute", 2);
20496         if ( sec < 0.0 || sec >= 60.0 ) throw new JSOFAIllegalParameter("bad second", 3);
20497         return days;
20498 
20499     }
20500 
20501     /**
20502      *  Transpose an r-matrix.
20503      *
20504      *<p>This function is derived from the International Astronomical Union's
20505      *  SOFA (Standards Of Fundamental Astronomy) software collection.
20506      *
20507      *<p>Status:  vector/matrix support function.
20508      *
20509      *<!-- Given: -->
20510      *     @param r         double[3][3]     r-matrix
20511      *
20512      *<!-- Returned: -->
20513      *     @return rt        double[3][3]      <u>returned</u> transpose
20514      *
20515      *  Note:
20516      *     It is permissible for r and rt to be the same array.
20517      *
20518      *<p>Called:<ul>
20519      *     <li>{@link #jauCr} copy r-matrix
20520      * </ul>
20521      *@version 2008 May 22
20522      *
20523      *  @since Release 20101201
20524      *
20525      *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20526      */
20527     public static double[][] jauTr(double r[][])
20528     {
20529         double wm[][]= new double[3][3];
20530         int i, j;
20531 
20532 
20533         for (i = 0; i < 3; i++) {
20534             for (j = 0; j < 3; j++) {
20535                 wm[i][j] = r[j][i];
20536             }
20537         }
20538 
20539 
20540         return wm;
20541 
20542     }
20543 
20544 
20545     /**
20546      *  Multiply a p-vector by the transpose of an r-matrix.
20547      *
20548      *<p>This function is derived from the International Astronomical Union's
20549      *  SOFA (Standards Of Fundamental Astronomy) software collection.
20550      *
20551      *<p>Status:  vector/matrix support function.
20552      *
20553      *<!-- Given: -->
20554      *     @param r         double[3][3]    r-matrix
20555      *     @param p         double[3]       p-vector
20556      *
20557      *<!-- Returned: -->
20558      *     @return trp       double[3]        <u>returned</u> r * p
20559      *
20560      *  Note:
20561      *     It is permissible for p and trp to be the same array.
20562      *
20563      *<p>Called:<ul>
20564      *     <li>{@link #jauTr} transpose r-matrix
20565     *     <li>{@link #jauRxp} product of r-matrix and p-vector
20566     * </ul>
20567     *@version 2008 October 28
20568     *
20569     *  @since Release 20101201
20570     *
20571     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20572     */
20573     public static double[] jauTrxp(double r[][], double p[]  )
20574     {
20575        double tr[][];
20576        double trp[];
20577 
20578     /* Transpose of matrix r. */
20579        tr = jauTr(r);
20580 
20581     /* Matrix tr * vector p -> vector trp. */
20582        trp = jauRxp(tr, p);
20583 
20584        return trp;
20585 
20586         }
20587     
20588 
20589     /**
20590     *  Multiply a pv-vector by the transpose of an r-matrix.
20591     *
20592     *<p>This function is derived from the International Astronomical Union's
20593     *  SOFA (Standards Of Fundamental Astronomy) software collection.
20594     *
20595     *<p>Status:  vector/matrix support function.
20596     *
20597     *<!-- Given: -->
20598     *     @param r         double[3][3]     r-matrix
20599     *     @param pv        double[2][3]     pv-vector
20600     *
20601     *<!-- Returned: -->
20602     *     @return trpv      double[2][3]      <u>returned</u> r * pv
20603     *
20604     *  Note:
20605     *     It is permissible for pv and trpv to be the same array.
20606     *
20607     *<p>Called:<ul>
20608     *     <li>{@link #jauTr} transpose r-matrix
20609     *     <li>{@link #jauRxpv} product of r-matrix and pv-vector
20610     * </ul>
20611     *@version 2008 October 28
20612     *
20613     *  @since Release 20101201
20614     *
20615     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20616     */
20617     public static double[][] jauTrxpv(double r[][], double pv[][] )
20618     {
20619        double tr[][], trpv[][];
20620 
20621 
20622     /* Transpose of matrix r. */
20623        tr = jauTr(r);
20624 
20625     /* Matrix tr * vector pv -> vector trpv. */
20626        trpv = jauRxpv(tr, pv);
20627 
20628        return trpv;
20629 
20630         }
20631     
20632     /*
20633      * constant arrays set outside jauXy06 to avoid problems with 65535 byte limit on function size
20634      */
20635     static {
20636         /* need to define this function because it appears that javac lumps all of the statically defined initalizers into one function on 
20637          * compilation - so this will force a second function */
20638         init_mfals();
20639     }
20640     /** Fundamental-argument multipliers:  luni-solar terms */
20641     private static int mfals[][]; //IMPL would like to be final really
20642     
20643     private static void init_mfals(){
20644         
20645     mfals = new int[][]
20646     {
20647 
20648    /* 1-10 */
20649       {  0,   0,   0,   0,   1 },
20650       {  0,   0,   2,  -2,   2 },
20651       {  0,   0,   2,   0,   2 },
20652       {  0,   0,   0,   0,   2 },
20653       {  0,   1,   0,   0,   0 },
20654       {  0,   1,   2,  -2,   2 },
20655       {  1,   0,   0,   0,   0 },
20656       {  0,   0,   2,   0,   1 },
20657       {  1,   0,   2,   0,   2 },
20658       {  0,   1,  -2,   2,  -2 },
20659 
20660    /* 11-20 */
20661       {  0,   0,   2,  -2,   1 },
20662       {  1,   0,  -2,   0,  -2 },
20663       {  1,   0,   0,  -2,   0 },
20664       {  1,   0,   0,   0,   1 },
20665       {  1,   0,   0,   0,  -1 },
20666       {  1,   0,  -2,  -2,  -2 },
20667       {  1,   0,   2,   0,   1 },
20668       {  2,   0,  -2,   0,  -1 },
20669       {  0,   0,   0,   2,   0 },
20670       {  0,   0,   2,   2,   2 },
20671 
20672    /* 21-30 */
20673       {  2,   0,   0,  -2,   0 },
20674       {  0,   2,  -2,   2,  -2 },
20675       {  2,   0,   2,   0,   2 },
20676       {  1,   0,   2,  -2,   2 },
20677       {  1,   0,  -2,   0,  -1 },
20678       {  2,   0,   0,   0,   0 },
20679       {  0,   0,   2,   0,   0 },
20680       {  0,   1,   0,   0,   1 },
20681       {  1,   0,   0,  -2,  -1 },
20682       {  0,   2,   2,  -2,   2 },
20683 
20684    /* 31-40 */
20685       {  0,   0,   2,  -2,   0 },
20686       {  1,   0,   0,  -2,   1 },
20687       {  0,   1,   0,   0,  -1 },
20688       {  0,   2,   0,   0,   0 },
20689       {  1,   0,  -2,  -2,  -1 },
20690       {  1,   0,   2,   2,   2 },
20691       {  0,   1,   2,   0,   2 },
20692       {  2,   0,  -2,   0,   0 },
20693       {  0,   0,   2,   2,   1 },
20694       {  0,   1,  -2,   0,  -2 },
20695 
20696    /* 41-50 */
20697       {  0,   0,   0,   2,   1 },
20698       {  1,   0,   2,  -2,   1 },
20699       {  2,   0,   0,  -2,  -1 },
20700       {  2,   0,   2,  -2,   2 },
20701       {  2,   0,   2,   0,   1 },
20702       {  0,   0,   0,   2,  -1 },
20703       {  0,   1,  -2,   2,  -1 },
20704       {  1,   1,   0,  -2,   0 },
20705       {  2,   0,   0,  -2,   1 },
20706       {  1,   0,   0,   2,   0 },
20707 
20708    /* 51-60 */
20709       {  0,   1,   2,  -2,   1 },
20710       {  1,  -1,   0,   0,   0 },
20711       {  0,   1,  -1,   1,  -1 },
20712       {  2,   0,  -2,   0,  -2 },
20713       {  0,   1,   0,  -2,   0 },
20714       {  1,   0,   0,  -1,   0 },
20715       {  3,   0,   2,   0,   2 },
20716       {  0,   0,   0,   1,   0 },
20717       {  1,  -1,   2,   0,   2 },
20718       {  1,   1,  -2,  -2,  -2 },
20719 
20720    /* 61-70 */
20721       {  1,   0,  -2,   0,   0 },
20722       {  2,   0,   0,   0,  -1 },
20723       {  0,   1,  -2,  -2,  -2 },
20724       {  1,   1,   2,   0,   2 },
20725       {  2,   0,   0,   0,   1 },
20726       {  1,   1,   0,   0,   0 },
20727       {  1,   0,  -2,   2,  -1 },
20728       {  1,   0,   2,   0,   0 },
20729       {  1,  -1,   0,  -1,   0 },
20730       {  1,   0,   0,   0,   2 },
20731 
20732    /* 71-80 */
20733       {  1,   0,  -1,   0,  -1 },
20734       {  0,   0,   2,   1,   2 },
20735       {  1,   0,  -2,  -4,  -2 },
20736       {  1,  -1,   0,  -1,  -1 },
20737       {  1,   0,   2,   2,   1 },
20738       {  0,   2,  -2,   2,  -1 },
20739       {  1,   0,   0,   0,  -2 },
20740       {  2,   0,  -2,  -2,  -2 },
20741       {  1,   1,   2,  -2,   2 },
20742       {  2,   0,  -2,  -4,  -2 },
20743 
20744    /* 81-90 */
20745       {  1,   0,  -4,   0,  -2 },
20746       {  2,   0,   2,  -2,   1 },
20747       {  1,   0,   0,  -1,  -1 },
20748       {  2,   0,   2,   2,   2 },
20749       {  3,   0,   0,   0,   0 },
20750       {  1,   0,   0,   2,   1 },
20751       {  0,   0,   2,  -2,  -1 },
20752       {  3,   0,   2,  -2,   2 },
20753       {  0,   0,   4,  -2,   2 },
20754       {  1,   0,   0,  -4,   0 },
20755 
20756    /* 91-100 */
20757       {  0,   1,   2,   0,   1 },
20758       {  2,   0,   0,  -4,   0 },
20759       {  1,   1,   0,  -2,  -1 },
20760       {  2,   0,  -2,   0,   1 },
20761       {  0,   0,   2,   0,  -1 },
20762       {  0,   1,  -2,   0,  -1 },
20763       {  0,   1,   0,   0,   2 },
20764       {  0,   0,   2,  -1,   2 },
20765       {  0,   0,   2,   4,   2 },
20766       {  2,   1,   0,  -2,   0 },
20767 
20768    /* 101-110 */
20769       {  1,   1,   0,  -2,   1 },
20770       {  1,  -1,   0,  -2,   0 },
20771       {  1,  -1,   0,  -1,  -2 },
20772       {  1,  -1,   0,   0,   1 },
20773       {  0,   1,  -2,   2,   0 },
20774       {  0,   1,   0,   0,  -2 },
20775       {  1,  -1,   2,   2,   2 },
20776       {  1,   0,   0,   2,  -1 },
20777       {  1,  -1,  -2,  -2,  -2 },
20778       {  3,   0,   2,   0,   1 },
20779 
20780    /* 111-120 */
20781       {  0,   1,   2,   2,   2 },
20782       {  1,   0,   2,  -2,   0 },
20783       {  1,   1,  -2,  -2,  -1 },
20784       {  1,   0,   2,  -4,   1 },
20785       {  0,   1,  -2,  -2,  -1 },
20786       {  2,  -1,   2,   0,   2 },
20787       {  0,   0,   0,   2,   2 },
20788       {  1,  -1,   2,   0,   1 },
20789       {  1,  -1,  -2,   0,  -2 },
20790       {  0,   1,   0,   2,   0 },
20791 
20792    /* 121-130 */
20793       {  0,   1,   2,  -2,   0 },
20794       {  0,   0,   0,   1,   1 },
20795       {  1,   0,  -2,  -2,   0 },
20796       {  0,   3,   2,  -2,   2 },
20797       {  2,   1,   2,   0,   2 },
20798       {  1,   1,   0,   0,   1 },
20799       {  2,   0,   0,   2,   0 },
20800       {  1,   1,   2,   0,   1 },
20801       {  1,   0,   0,  -2,  -2 },
20802       {  1,   0,  -2,   2,   0 },
20803 
20804    /* 131-140 */
20805       {  1,   0,  -1,   0,  -2 },
20806       {  0,   1,   0,  -2,   1 },
20807       {  0,   1,   0,   1,   0 },
20808       {  0,   0,   0,   1,  -1 },
20809       {  1,   0,  -2,   2,  -2 },
20810       {  1,  -1,   0,   0,  -1 },
20811       {  0,   0,   0,   4,   0 },
20812       {  1,  -1,   0,   2,   0 },
20813       {  1,   0,   2,   1,   2 },
20814       {  1,   0,   2,  -1,   2 },
20815 
20816    /* 141-150 */
20817       {  0,   0,   2,   1,   1 },
20818       {  1,   0,   0,  -2,   2 },
20819       {  1,   0,  -2,   0,   1 },
20820       {  1,   0,  -2,  -4,  -1 },
20821       {  0,   0,   2,   2,   0 },
20822       {  1,   1,   2,  -2,   1 },
20823       {  1,   0,  -2,   1,  -1 },
20824       {  0,   0,   1,   0,   1 },
20825       {  2,   0,  -2,  -2,  -1 },
20826       {  4,   0,   2,   0,   2 },
20827 
20828    /* 151-160 */
20829       {  2,  -1,   0,   0,   0 },
20830       {  2,   1,   2,  -2,   2 },
20831       {  0,   1,   2,   1,   2 },
20832       {  1,   0,   4,  -2,   2 },
20833       {  1,   1,   0,   0,  -1 },
20834       {  2,   0,   2,   0,   0 },
20835       {  2,   0,  -2,  -4,  -1 },
20836       {  1,   0,  -1,   0,   0 },
20837       {  1,   0,   0,   1,   0 },
20838       {  0,   1,   0,   2,   1 },
20839 
20840    /* 161-170 */
20841       {  1,   0,  -4,   0,  -1 },
20842       {  1,   0,   0,  -4,  -1 },
20843       {  2,   0,   2,   2,   1 },
20844       {  2,   1,   0,   0,   0 },
20845       {  0,   0,   2,  -3,   2 },
20846       {  1,   2,   0,  -2,   0 },
20847       {  0,   3,   0,   0,   0 },
20848       {  0,   0,   4,   0,   2 },
20849       {  0,   0,   2,  -4,   1 },
20850       {  2,   0,   0,  -2,  -2 },
20851 
20852    /* 171-180 */
20853       {  1,   1,  -2,  -4,  -2 },
20854       {  0,   1,   0,  -2,  -1 },
20855       {  0,   0,   0,   4,   1 },
20856       {  3,   0,   2,  -2,   1 },
20857       {  1,   0,   2,   4,   2 },
20858       {  1,   1,  -2,   0,  -2 },
20859       {  0,   0,   4,  -2,   1 },
20860       {  2,  -2,   0,  -2,   0 },
20861       {  2,   1,   0,  -2,  -1 },
20862       {  0,   2,   0,  -2,   0 },
20863 
20864    /* 181-190 */
20865       {  1,   0,   0,  -1,   1 },
20866       {  1,   1,   2,   2,   2 },
20867       {  3,   0,   0,   0,  -1 },
20868       {  2,   0,   0,  -4,  -1 },
20869       {  3,   0,   2,   2,   2 },
20870       {  0,   0,   2,   4,   1 },
20871       {  0,   2,  -2,  -2,  -2 },
20872       {  1,  -1,   0,  -2,  -1 },
20873       {  0,   0,   2,  -1,   1 },
20874       {  2,   0,   0,   2,   1 },
20875 
20876    /* 191-200 */
20877       {  1,  -1,  -2,   2,  -1 },
20878       {  0,   0,   0,   2,  -2 },
20879       {  2,   0,   0,  -4,   1 },
20880       {  1,   0,   0,  -4,   1 },
20881       {  2,   0,   2,  -4,   1 },
20882       {  4,   0,   2,  -2,   2 },
20883       {  2,   1,  -2,   0,  -1 },
20884       {  2,   1,  -2,  -4,  -2 },
20885       {  3,   0,   0,  -4,   0 },
20886       {  1,  -1,   2,   2,   1 },
20887 
20888    /* 201-210 */
20889       {  1,  -1,  -2,   0,  -1 },
20890       {  0,   2,   0,   0,   1 },
20891       {  1,   2,  -2,  -2,  -2 },
20892       {  1,   1,   0,  -4,   0 },
20893       {  2,   0,   0,  -2,   2 },
20894       {  0,   2,   2,  -2,   1 },
20895       {  1,   0,   2,   0,  -1 },
20896       {  2,   1,   0,  -2,   1 },
20897       {  2,  -1,  -2,   0,  -1 },
20898       {  1,  -1,  -2,  -2,  -1 },
20899 
20900    /* 211-220 */
20901       {  0,   1,  -2,   1,  -2 },
20902       {  1,   0,  -4,   2,  -2 },
20903       {  0,   1,   2,   2,   1 },
20904       {  3,   0,   0,   0,   1 },
20905       {  2,  -1,   2,   2,   2 },
20906       {  0,   1,  -2,  -4,  -2 },
20907       {  1,   0,  -2,  -3,  -2 },
20908       {  2,   0,   0,   0,   2 },
20909       {  1,  -1,   0,  -2,  -2 },
20910       {  2,   0,  -2,   2,  -1 },
20911 
20912    /* 221-230 */
20913       {  0,   2,  -2,   0,  -2 },
20914       {  3,   0,  -2,   0,  -1 },
20915       {  2,  -1,   2,   0,   1 },
20916       {  1,   0,  -2,  -1,  -2 },
20917       {  0,   0,   2,   0,   3 },
20918       {  2,   0,  -4,   0,  -2 },
20919       {  2,   1,   0,  -4,   0 },
20920       {  1,   1,  -2,   1,  -1 },
20921       {  0,   2,   2,   0,   2 },
20922       {  1,  -1,   2,  -2,   2 },
20923 
20924    /* 231-240 */
20925       {  1,  -1,   0,  -2,   1 },
20926       {  2,   1,   2,   0,   1 },
20927       {  1,   0,   2,  -4,   2 },
20928       {  1,   1,  -2,   0,  -1 },
20929       {  1,   1,   0,   2,   0 },
20930       {  1,   0,   0,  -3,   0 },
20931       {  2,   0,   2,  -1,   2 },
20932       {  0,   2,   0,   0,  -1 },
20933       {  2,  -1,   0,  -2,   0 },
20934       {  4,   0,   0,   0,   0 },
20935 
20936    /* 241-250 */
20937       {  2,   1,  -2,  -2,  -2 },
20938       {  0,   2,  -2,   2,   0 },
20939       {  1,   0,   2,   1,   1 },
20940       {  1,   0,  -1,   0,  -3 },
20941       {  3,  -1,   2,   0,   2 },
20942       {  2,   0,   2,  -2,   0 },
20943       {  1,  -2,   0,   0,   0 },
20944       {  2,   0,   0,   0,  -2 },
20945       {  1,   0,   0,   4,   0 },
20946       {  0,   1,   0,   1,   1 },
20947 
20948    /* 251-260 */
20949       {  1,   0,   2,   2,   0 },
20950       {  0,   1,   0,   2,  -1 },
20951       {  0,   1,   0,   1,  -1 },
20952       {  0,   0,   2,  -2,   3 },
20953       {  3,   1,   2,   0,   2 },
20954       {  1,   1,   2,   1,   2 },
20955       {  1,   1,  -2,   2,  -1 },
20956       {  2,  -1,   2,  -2,   2 },
20957       {  1,  -2,   2,   0,   2 },
20958       {  1,   0,   2,  -4,   0 },
20959 
20960    /* 261-270 */
20961       {  0,   0,   1,   0,   0 },
20962       {  1,   0,   2,  -3,   1 },
20963       {  1,  -2,   0,  -2,   0 },
20964       {  2,   0,   0,   2,  -1 },
20965       {  1,   1,   2,  -4,   1 },
20966       {  4,   0,   2,   0,   1 },
20967       {  0,   1,   2,   1,   1 },
20968       {  1,   2,   2,  -2,   2 },
20969       {  2,   0,   2,   1,   2 },
20970       {  2,   1,   2,  -2,   1 },
20971 
20972    /* 271-280 */
20973       {  1,   0,   2,  -1,   1 },
20974       {  1,   0,   4,  -2,   1 },
20975       {  1,  -1,   2,  -2,   1 },
20976       {  0,   1,   0,  -4,   0 },
20977       {  3,   0,  -2,  -2,  -2 },
20978       {  0,   0,   4,  -4,   2 },
20979       {  2,   0,  -4,  -2,  -2 },
20980       {  2,  -2,   0,  -2,  -1 },
20981       {  1,   0,   2,  -2,  -1 },
20982       {  2,   0,  -2,  -6,  -2 },
20983 
20984    /* 281-290 */
20985       {  1,   0,  -2,   1,  -2 },
20986       {  1,   0,  -2,   2,   1 },
20987       {  1,  -1,   0,   2,  -1 },
20988       {  1,   0,  -2,   1,   0 },
20989       {  2,  -1,   0,  -2,   1 },
20990       {  1,  -1,   0,   2,   1 },
20991       {  2,   0,  -2,  -2,   0 },
20992       {  1,   0,   2,  -3,   2 },
20993       {  0,   0,   0,   4,  -1 },
20994       {  2,  -1,   0,   0,   1 },
20995 
20996    /* 291-300 */
20997       {  2,   0,   4,  -2,   2 },
20998       {  0,   0,   2,   3,   2 },
20999       {  0,   1,   4,  -2,   2 },
21000       {  0,   1,  -2,   2,   1 },
21001       {  1,   1,   0,   2,   1 },
21002       {  1,   0,   0,   4,   1 },
21003       {  0,   0,   4,   0,   1 },
21004       {  2,   0,   0,  -3,   0 },
21005       {  1,   0,   0,  -1,  -2 },
21006       {  1,  -2,  -2,  -2,  -2 },
21007 
21008    /* 301-310 */
21009       {  3,   0,   0,   2,   0 },
21010       {  2,   0,   2,  -4,   2 },
21011       {  1,   1,  -2,  -4,  -1 },
21012       {  1,   0,  -2,  -6,  -2 },
21013       {  2,  -1,   0,   0,  -1 },
21014       {  2,  -1,   0,   2,   0 },
21015       {  0,   1,   2,  -2,  -1 },
21016       {  1,   1,   0,   1,   0 },
21017       {  1,   2,   0,  -2,  -1 },
21018       {  1,   0,   0,   1,  -1 },
21019 
21020    /* 311-320 */
21021       {  0,   0,   1,   0,   2 },
21022       {  3,   1,   2,  -2,   2 },
21023       {  1,   0,  -4,  -2,  -2 },
21024       {  1,   0,   2,   4,   1 },
21025       {  1,  -2,   2,   2,   2 },
21026       {  1,  -1,  -2,  -4,  -2 },
21027       {  0,   0,   2,  -4,   2 },
21028       {  0,   0,   2,  -3,   1 },
21029       {  2,   1,  -2,   0,   0 },
21030       {  3,   0,  -2,  -2,  -1 },
21031 
21032    /* 321-330 */
21033       {  2,   0,   2,   4,   2 },
21034       {  0,   0,   0,   0,   3 },
21035       {  2,  -1,  -2,  -2,  -2 },
21036       {  2,   0,   0,  -1,   0 },
21037       {  3,   0,   2,  -4,   2 },
21038       {  2,   1,   2,   2,   2 },
21039       {  0,   0,   3,   0,   3 },
21040       {  1,   1,   2,   2,   1 },
21041       {  2,   1,   0,   0,  -1 },
21042       {  1,   2,   0,  -2,   1 },
21043 
21044    /* 331-340 */
21045       {  3,   0,   2,   2,   1 },
21046       {  1,  -1,  -2,   2,  -2 },
21047       {  1,   1,   0,  -1,   0 },
21048       {  1,   2,   0,   0,   0 },
21049       {  1,   0,   4,   0,   2 },
21050       {  1,  -1,   2,   4,   2 },
21051       {  2,   1,   0,   0,   1 },
21052       {  1,   0,   0,   2,   2 },
21053       {  1,  -1,  -2,   2,   0 },
21054       {  0,   2,  -2,  -2,  -1 },
21055 
21056    /* 341-350 */
21057       {  2,   0,  -2,   0,   2 },
21058       {  5,   0,   2,   0,   2 },
21059       {  3,   0,  -2,  -6,  -2 },
21060       {  1,  -1,   2,  -1,   2 },
21061       {  3,   0,   0,  -4,  -1 },
21062       {  1,   0,   0,   1,   1 },
21063       {  1,   0,  -4,   2,  -1 },
21064       {  0,   1,   2,  -4,   1 },
21065       {  1,   2,   2,   0,   2 },
21066       {  0,   1,   0,  -2,  -2 },
21067 
21068    /* 351-360 */
21069       {  0,   0,   2,  -1,   0 },
21070       {  1,   0,   1,   0,   1 },
21071       {  0,   2,   0,  -2,   1 },
21072       {  3,   0,   2,   0,   0 },
21073       {  1,   1,  -2,   1,   0 },
21074       {  2,   1,  -2,  -4,  -1 },
21075       {  3,  -1,   0,   0,   0 },
21076       {  2,  -1,  -2,   0,   0 },
21077       {  4,   0,   2,  -2,   1 },
21078       {  2,   0,  -2,   2,   0 },
21079 
21080    /* 361-370 */
21081       {  1,   1,   2,  -2,   0 },
21082       {  1,   0,  -2,   4,  -1 },
21083       {  1,   0,  -2,  -2,   1 },
21084       {  2,   0,   2,  -4,   0 },
21085       {  1,   1,   0,  -2,  -2 },
21086       {  1,   1,  -2,  -2,   0 },
21087       {  1,   0,   1,  -2,   1 },
21088       {  2,  -1,  -2,  -4,  -2 },
21089       {  3,   0,  -2,   0,  -2 },
21090       {  0,   1,  -2,  -2,   0 },
21091 
21092    /* 371-380 */
21093       {  3,   0,   0,  -2,  -1 },
21094       {  1,   0,  -2,  -3,  -1 },
21095       {  0,   1,   0,  -4,  -1 },
21096       {  1,  -2,   2,  -2,   1 },
21097       {  0,   1,  -2,   1,  -1 },
21098       {  1,  -1,   0,   0,   2 },
21099       {  2,   0,   0,   1,   0 },
21100       {  1,  -2,   0,   2,   0 },
21101       {  1,   2,  -2,  -2,  -1 },
21102       {  0,   0,   4,  -4,   1 },
21103 
21104    /* 381-390 */
21105       {  0,   1,   2,   4,   2 },
21106       {  0,   1,  -4,   2,  -2 },
21107       {  3,   0,  -2,   0,   0 },
21108       {  2,  -1,   2,   2,   1 },
21109       {  0,   1,  -2,  -4,  -1 },
21110       {  4,   0,   2,   2,   2 },
21111       {  2,   0,  -2,  -3,  -2 },
21112       {  2,   0,   0,  -6,   0 },
21113       {  1,   0,   2,   0,   3 },
21114       {  3,   1,   0,   0,   0 },
21115 
21116    /* 391-400 */
21117       {  3,   0,   0,  -4,   1 },
21118       {  1,  -1,   2,   0,   0 },
21119       {  1,  -1,   0,  -4,   0 },
21120       {  2,   0,  -2,   2,  -2 },
21121       {  1,   1,   0,  -2,   2 },
21122       {  4,   0,   0,  -2,   0 },
21123       {  2,   2,   0,  -2,   0 },
21124       {  0,   1,   2,   0,   0 },
21125       {  1,   1,   0,  -4,   1 },
21126       {  1,   0,   0,  -4,  -2 },
21127 
21128    /* 401-410 */
21129       {  0,   0,   0,   1,   2 },
21130       {  3,   0,   0,   2,   1 },
21131       {  1,   1,   0,  -4,  -1 },
21132       {  0,   0,   2,   2,  -1 },
21133       {  1,   1,   2,   0,   0 },
21134       {  1,  -1,   2,  -4,   1 },
21135       {  1,   1,   0,   0,   2 },
21136       {  0,   0,   2,   6,   2 },
21137       {  4,   0,  -2,  -2,  -1 },
21138       {  2,   1,   0,  -4,  -1 },
21139 
21140    /* 411-420 */
21141       {  0,   0,   0,   3,   1 },
21142       {  1,  -1,  -2,   0,   0 },
21143       {  0,   0,   2,   1,   0 },
21144       {  1,   0,   0,   2,  -2 },
21145       {  3,  -1,   2,   2,   2 },
21146       {  3,  -1,   2,  -2,   2 },
21147       {  1,   0,   0,  -1,   2 },
21148       {  1,  -2,   2,  -2,   2 },
21149       {  0,   1,   0,   2,   2 },
21150       {  0,   1,  -2,  -1,  -2 },
21151 
21152    /* 421-430 */
21153       {  1,   1,  -2,   0,   0 },
21154       {  0,   2,   2,  -2,   0 },
21155       {  3,  -1,  -2,  -1,  -2 },
21156       {  1,   0,   0,  -6,   0 },
21157       {  1,   0,  -2,  -4,   0 },
21158       {  2,   1,   0,  -4,   1 },
21159       {  2,   0,   2,   0,  -1 },
21160       {  2,   0,  -4,   0,  -1 },
21161       {  0,   0,   3,   0,   2 },
21162       {  2,   1,  -2,  -2,  -1 },
21163 
21164    /* 431-440 */
21165       {  1,  -2,   0,   0,   1 },
21166       {  2,  -1,   0,  -4,   0 },
21167       {  0,   0,   0,   3,   0 },
21168       {  5,   0,   2,  -2,   2 },
21169       {  1,   2,  -2,  -4,  -2 },
21170       {  1,   0,   4,  -4,   2 },
21171       {  0,   0,   4,  -1,   2 },
21172       {  3,   1,   0,  -4,   0 },
21173       {  3,   0,   0,  -6,   0 },
21174       {  2,   0,   0,   2,   2 },
21175 
21176    /* 441-450 */
21177       {  2,  -2,   2,   0,   2 },
21178       {  1,   0,   0,  -3,   1 },
21179       {  1,  -2,  -2,   0,  -2 },
21180       {  1,  -1,  -2,  -3,  -2 },
21181       {  0,   0,   2,  -2,  -2 },
21182       {  2,   0,  -2,  -4,   0 },
21183       {  1,   0,  -4,   0,   0 },
21184       {  0,   1,   0,  -1,   0 },
21185       {  4,   0,   0,   0,  -1 },
21186       {  3,   0,   2,  -1,   2 },
21187 
21188    /* 451-460 */
21189       {  3,  -1,   2,   0,   1 },
21190       {  2,   0,   2,  -1,   1 },
21191       {  1,   2,   2,  -2,   1 },
21192       {  1,   1,   0,   2,  -1 },
21193       {  0,   2,   2,   0,   1 },
21194       {  3,   1,   2,   0,   1 },
21195       {  1,   1,   2,   1,   1 },
21196       {  1,   1,   0,  -1,   1 },
21197       {  1,  -2,   0,  -2,  -1 },
21198       {  4,   0,   0,  -4,   0 },
21199 
21200    /* 461-470 */
21201       {  2,   1,   0,   2,   0 },
21202       {  1,  -1,   0,   4,   0 },
21203       {  0,   1,   0,  -2,   2 },
21204       {  0,   0,   2,   0,  -2 },
21205       {  1,   0,  -1,   0,   1 },
21206       {  3,   0,   2,  -2,   0 },
21207       {  2,   0,   2,   2,   0 },
21208       {  1,   2,   0,  -4,   0 },
21209       {  1,  -1,   0,  -3,   0 },
21210       {  0,   1,   0,   4,   0 },
21211 
21212    /* 471 - 480 */
21213       {  0,   1,  -2,   0,   0 },
21214       {  2,   2,   2,  -2,   2 },
21215       {  0,   0,   0,   1,  -2 },
21216       {  0,   2,  -2,   0,  -1 },
21217       {  4,   0,   2,  -4,   2 },
21218       {  2,   0,  -4,   2,  -2 },
21219       {  2,  -1,  -2,   0,  -2 },
21220       {  1,   1,   4,  -2,   2 },
21221       {  1,   1,   2,  -4,   2 },
21222       {  1,   0,   2,   3,   2 },
21223 
21224    /* 481-490 */
21225       {  1,   0,   0,   4,  -1 },
21226       {  0,   0,   0,   4,   2 },
21227       {  2,   0,   0,   4,   0 },
21228       {  1,   1,  -2,   2,   0 },
21229       {  2,   1,   2,   1,   2 },
21230       {  2,   1,   2,  -4,   1 },
21231       {  2,   0,   2,   1,   1 },
21232       {  2,   0,  -4,  -2,  -1 },
21233       {  2,   0,  -2,  -6,  -1 },
21234       {  2,  -1,   2,  -1,   2 },
21235 
21236    /* 491-500 */
21237       {  1,  -2,   2,   0,   1 },
21238       {  1,  -2,   0,  -2,   1 },
21239       {  1,  -1,   0,  -4,  -1 },
21240       {  0,   2,   2,   2,   2 },
21241       {  0,   2,  -2,  -4,  -2 },
21242       {  0,   1,   2,   3,   2 },
21243       {  0,   1,   0,  -4,   1 },
21244       {  3,   0,   0,  -2,   1 },
21245       {  2,   1,  -2,   0,   1 },
21246       {  2,   0,   4,  -2,   1 },
21247 
21248    /* 501-510 */
21249       {  2,   0,   0,  -3,  -1 },
21250       {  2,  -2,   0,  -2,   1 },
21251       {  2,  -1,   2,  -2,   1 },
21252       {  1,   0,   0,  -6,  -1 },
21253       {  1,  -2,   0,   0,  -1 },
21254       {  1,  -2,  -2,  -2,  -1 },
21255       {  0,   1,   4,  -2,   1 },
21256       {  0,   0,   2,   3,   1 },
21257       {  2,  -1,   0,  -1,   0 },
21258       {  1,   3,   0,  -2,   0 },
21259 
21260    /* 511-520 */
21261       {  0,   3,   0,  -2,   0 },
21262       {  2,  -2,   2,  -2,   2 },
21263       {  0,   0,   4,  -2,   0 },
21264       {  4,  -1,   2,   0,   2 },
21265       {  2,   2,  -2,  -4,  -2 },
21266       {  4,   1,   2,   0,   2 },
21267       {  4,  -1,  -2,  -2,  -2 },
21268       {  2,   1,   0,  -2,  -2 },
21269       {  2,   1,  -2,  -6,  -2 },
21270       {  2,   0,   0,  -1,   1 },
21271 
21272    /* 521-530 */
21273       {  2,  -1,  -2,   2,  -1 },
21274       {  1,   1,  -2,   2,  -2 },
21275       {  1,   1,  -2,  -3,  -2 },
21276       {  1,   0,   3,   0,   3 },
21277       {  1,   0,  -2,   1,   1 },
21278       {  1,   0,  -2,   0,   2 },
21279       {  1,  -1,   2,   1,   2 },
21280       {  1,  -1,   0,   0,  -2 },
21281       {  1,  -1,  -4,   2,  -2 },
21282       {  0,   3,  -2,  -2,  -2 },
21283 
21284    /* 531-540 */
21285       {  0,   1,   0,   4,   1 },
21286       {  0,   0,   4,   2,   2 },
21287       {  3,   0,  -2,  -2,   0 },
21288       {  2,  -2,   0,   0,   0 },
21289       {  1,   1,   2,  -4,   0 },
21290       {  1,   1,   0,  -3,   0 },
21291       {  1,   0,   2,  -3,   0 },
21292       {  1,  -1,   2,  -2,   0 },
21293       {  0,   2,   0,   2,   0 },
21294       {  0,   0,   2,   4,   0 },
21295 
21296    /* 541-550 */
21297       {  1,   0,   1,   0,   0 },
21298       {  3,   1,   2,  -2,   1 },
21299       {  3,   0,   4,  -2,   2 },
21300       {  3,   0,   2,   1,   2 },
21301       {  3,   0,   0,   2,  -1 },
21302       {  3,   0,   0,   0,   2 },
21303       {  3,   0,  -2,   2,  -1 },
21304       {  2,   0,   4,  -4,   2 },
21305       {  2,   0,   2,  -3,   2 },
21306       {  2,   0,   0,   4,   1 },
21307 
21308    /* 551-560 */
21309       {  2,   0,   0,  -3,   1 },
21310       {  2,   0,  -4,   2,  -1 },
21311       {  2,   0,  -2,  -2,   1 },
21312       {  2,  -2,   2,   2,   2 },
21313       {  2,  -2,   0,  -2,  -2 },
21314       {  2,  -1,   0,   2,   1 },
21315       {  2,  -1,   0,   2,  -1 },
21316       {  1,   1,   2,   4,   2 },
21317       {  1,   1,   0,   1,   1 },
21318       {  1,   1,   0,   1,  -1 },
21319 
21320    /* 561-570 */
21321       {  1,   1,  -2,  -6,  -2 },
21322       {  1,   0,   0,  -3,  -1 },
21323       {  1,   0,  -4,  -2,  -1 },
21324       {  1,   0,  -2,  -6,  -1 },
21325       {  1,  -2,   2,   2,   1 },
21326       {  1,  -2,  -2,   2,  -1 },
21327       {  1,  -1,  -2,  -4,  -1 },
21328       {  0,   2,   0,   0,   2 },
21329       {  0,   1,   2,  -4,   2 },
21330       {  0,   1,  -2,   4,  -1 },
21331 
21332    /* 571-580 */
21333       {  5,   0,   0,   0,   0 },
21334       {  3,   0,   0,  -3,   0 },
21335       {  2,   2,   0,  -4,   0 },
21336       {  1,  -1,   2,   2,   0 },
21337       {  0,   1,   0,   3,   0 },
21338       {  4,   0,  -2,   0,  -1 },
21339       {  3,   0,  -2,  -6,  -1 },
21340       {  3,   0,  -2,  -1,  -1 },
21341       {  2,   1,   2,   2,   1 },
21342       {  2,   1,   0,   2,   1 },
21343 
21344    /* 581-590 */
21345       {  2,   0,   2,   4,   1 },
21346       {  2,   0,   2,  -6,   1 },
21347       {  2,   0,   2,  -2,  -1 },
21348       {  2,   0,   0,  -6,  -1 },
21349       {  2,  -1,  -2,  -2,  -1 },
21350       {  1,   2,   2,   0,   1 },
21351       {  1,   2,   0,   0,   1 },
21352       {  1,   0,   4,   0,   1 },
21353       {  1,   0,   2,  -6,   1 },
21354       {  1,   0,   2,  -4,  -1 },
21355 
21356    /* 591-600 */
21357       {  1,   0,  -1,  -2,  -1 },
21358       {  1,  -1,   2,   4,   1 },
21359       {  1,  -1,   2,  -3,   1 },
21360       {  1,  -1,   0,   4,   1 },
21361       {  1,  -1,  -2,   1,  -1 },
21362       {  0,   1,   2,  -2,   3 },
21363       {  3,   0,   0,  -2,   0 },
21364       {  1,   0,   1,  -2,   0 },
21365       {  0,   2,   0,  -4,   0 },
21366       {  0,   0,   2,  -4,   0 },
21367 
21368    /* 601-610 */
21369       {  0,   0,   1,  -1,   0 },
21370       {  0,   0,   0,   6,   0 },
21371       {  0,   2,   0,   0,  -2 },
21372       {  0,   1,  -2,   2,  -3 },
21373       {  4,   0,   0,   2,   0 },
21374       {  3,   0,   0,  -1,   0 },
21375       {  3,  -1,   0,   2,   0 },
21376       {  2,   1,   0,   1,   0 },
21377       {  2,   1,   0,  -6,   0 },
21378       {  2,  -1,   2,   0,   0 },
21379 
21380    /* 611-620 */
21381       {  1,   0,   2,  -1,   0 },
21382       {  1,  -1,   0,   1,   0 },
21383       {  1,  -1,  -2,  -2,   0 },
21384       {  0,   1,   2,   2,   0 },
21385       {  0,   0,   2,  -3,   0 },
21386       {  2,   2,   0,  -2,  -1 },
21387       {  2,  -1,  -2,   0,   1 },
21388       {  1,   2,   2,  -4,   1 },
21389       {  0,   1,   4,  -4,   2 },
21390       {  0,   0,   0,   3,   2 },
21391 
21392    /* 621-630 */
21393       {  5,   0,   2,   0,   1 },
21394       {  4,   1,   2,  -2,   2 },
21395       {  4,   0,  -2,  -2,   0 },
21396       {  3,   1,   2,   2,   2 },
21397       {  3,   1,   0,  -2,   0 },
21398       {  3,   1,  -2,  -6,  -2 },
21399       {  3,   0,   0,   0,  -2 },
21400       {  3,   0,  -2,  -4,  -2 },
21401       {  3,  -1,   0,  -3,   0 },
21402       {  3,  -1,   0,  -2,   0 },
21403 
21404    /* 631-640 */
21405       {  2,   1,   2,   0,   0 },
21406       {  2,   1,   2,  -4,   2 },
21407       {  2,   1,   2,  -2,   0 },
21408       {  2,   1,   0,  -3,   0 },
21409       {  2,   1,  -2,   0,  -2 },
21410       {  2,   0,   0,  -4,   2 },
21411       {  2,   0,   0,  -4,  -2 },
21412       {  2,   0,  -2,  -5,  -2 },
21413       {  2,  -1,   2,   4,   2 },
21414       {  2,  -1,   0,  -2,   2 },
21415 
21416    /* 641-650 */
21417       {  1,   3,  -2,  -2,  -2 },
21418       {  1,   1,   0,   0,  -2 },
21419       {  1,   1,   0,  -6,   0 },
21420       {  1,   1,  -2,   1,  -2 },
21421       {  1,   1,  -2,  -1,  -2 },
21422       {  1,   0,   2,   1,   0 },
21423       {  1,   0,   0,   3,   0 },
21424       {  1,   0,   0,  -4,   2 },
21425       {  1,   0,  -2,   4,  -2 },
21426       {  1,  -2,   0,  -1,   0 },
21427 
21428    /* 651-NFLS */
21429       {  0,   1,  -4,   2,  -1 },
21430       {  1,   0,  -2,   0,  -3 },
21431       {  0,   0,   4,  -4,   4 }
21432    };
21433     }
21434 
21435 
21436     /* Fundamental-argument multipliers:  planetary terms */
21437       private static final int mfapl[][] = {
21438 
21439        /* 1-10 */
21440           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21441           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0, -1 },
21442           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0, -2 },
21443           {  0,  0,  1, -1,  1,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
21444           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  2 },
21445           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21446           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21447           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0,  0 },
21448           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21449           {  0,  0,  0,  0,  1,  0,  0, -1,  2,  0,  0,  0,  0,  0 },
21450 
21451        /* 11-20 */
21452           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0, -1 },
21453           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  2, -5,  0,  0,  0 },
21454           {  0,  0,  2, -2,  1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21455           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0, -2 },
21456           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -1,  0,  0,  0,  2 },
21457           {  0,  0,  0,  0,  0,  0,  0,  2, -8,  3,  0,  0,  0, -2 },
21458           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0, -2 },
21459           {  0,  0,  0,  0,  0,  0,  0,  6, -8,  3,  0,  0,  0,  2 },
21460           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0 },
21461           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
21462 
21463        /* 21-30 */
21464           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
21465           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  2 },
21466           {  0,  0,  0,  0,  1,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21467           {  0,  0,  0,  0,  1,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21468           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0 },
21469           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  2 },
21470           {  0,  0,  1, -1,  1,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21471           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21472           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  1 },
21473           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21474 
21475        /* 31-40 */
21476           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
21477           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0,  0 },
21478           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  2 },
21479           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0, -2 },
21480           {  0,  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0 },
21481           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  1 },
21482           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21483           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21484           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0,  0 },
21485           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
21486 
21487        /* 41-50 */
21488           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  0,  0,  0,  0 },
21489           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0, -2 },
21490           {  0,  0,  1, -1,  0,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21491           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -2,  0,  0,  0,  2 },
21492           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0, -2 },
21493           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
21494           {  0,  0,  0,  0,  0,  0,  2, -1,  0,  0,  0,  0,  0,  2 },
21495           {  1,  0,  0,  0,  0,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21496           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21497           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  1,  0,  0,  0,  2 },
21498 
21499        /* 51-60 */
21500           {  0,  0,  1, -1,  1,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21501           {  1,  0,  0,  0,  0,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
21502           {  0,  0,  2, -2,  0,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21503           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -1,  0,  0,  0,  2 },
21504           {  1,  0,  2,  0,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21505           {  0,  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  2 },
21506           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  1 },
21507           {  1,  0, -2,  0, -2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21508           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21509           {  0,  0,  2, -2,  1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21510 
21511        /* 61-70 */
21512           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  2 },
21513           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0, -2 },
21514           {  0,  0,  1, -1,  1,  0,  0,  3, -8,  3,  0,  0,  0,  0 },
21515           {  0,  0,  0,  0,  0,  0,  8,-11,  0,  0,  0,  0,  0, -2 },
21516           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  2 },
21517           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0,  2 },
21518           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0, -1 },
21519           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0, -1 },
21520           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0, -2 },
21521           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0 },
21522 
21523        /* 71-80 */
21524           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0, -2 },
21525           {  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  0,  2 },
21526           {  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0, -2 },
21527           {  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0,  0, -2 },
21528           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0, -2 },
21529           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -2,  0,  0,  0,  2 },
21530           {  0,  0,  1, -1,  1,  0,  0, -5,  8, -3,  0,  0,  0,  0 },
21531           {  0,  0,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  0,  2 },
21532           {  0,  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  2 },
21533           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0,  0 },
21534 
21535        /* 81-90 */
21536           {  2,  0,  0, -2,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21537           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0, -1 },
21538           {  2,  0,  0, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21539           {  0,  0,  0,  0,  1,  0,  8,-13,  0,  0,  0,  0,  0,  0 },
21540           {  0,  0,  0,  0,  1,  0,  0,  0,  0, -2,  5,  0,  0,  0 },
21541           {  1,  0,  0, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21542           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  2 },
21543           {  1,  0,  0,  0, -1,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21544           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  2, -5,  0,  0,  0 },
21545           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
21546 
21547        /* 91-100 */
21548           {  1,  0,  0, -2,  0,  0, 19,-21,  3,  0,  0,  0,  0,  0 },
21549           {  0,  0,  0,  0,  1,  0, -8, 13,  0,  0,  0,  0,  0,  0 },
21550           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
21551           {  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  0, -2 },
21552           {  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  2 },
21553           {  1,  0,  0,  0,  1,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21554           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0, -1 },
21555           {  0,  0,  0,  0,  0,  0,  0,  6,-16,  4,  5,  0,  0, -2 },
21556           {  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0, -2 },
21557           {  0,  0,  0,  0,  0,  0,  3, -7,  0,  0,  0,  0,  0, -2 },
21558 
21559        /* 101-110 */
21560           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0, -1 },
21561           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1 },
21562           {  2,  0,  0, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21563           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0, -1 },
21564           {  0,  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0 },
21565           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0,  0 },
21566           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21567           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  0 },
21568           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0 },
21569           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  2,  0,  0,  0,  2 },
21570 
21571        /* 111-120 */
21572           {  0,  0,  0,  0,  1,  0,  0,  1, -2,  0,  0,  0,  0,  0 },
21573           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  2 },
21574           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21575           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -3,  0,  0,  0,  0 },
21576           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0, -1 },
21577           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  2 },
21578           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  0 },
21579           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21580           {  2,  0,  0, -2,  0,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21581           {  0,  0,  1, -1,  1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21582 
21583        /* 121-130 */
21584           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  1 },
21585           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21586           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0, -1 },
21587           {  0,  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0 },
21588           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0, -2 },
21589           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -1,  0,  0,  0 },
21590           {  0,  0,  0,  0,  0,  0,  8,-10,  0,  0,  0,  0,  0, -2 },
21591           {  0,  0,  1, -1,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21592           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0, -2 },
21593           {  1,  0,  0, -1,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21594 
21595        /* 131-140 */
21596           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0, -1 },
21597           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  0 },
21598           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -1 },
21599           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0, -1 },
21600           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0 },
21601           {  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  2 },
21602           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -3,  0,  0,  0,  2 },
21603           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  1 },
21604           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  1 },
21605           {  0,  0,  0,  0,  1,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
21606 
21607        /* 141-150 */
21608           {  1,  0,  0, -1,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21609           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0, -1 },
21610           {  0,  0,  0,  0,  0,  0,  0,  5, -4,  0,  0,  0,  0,  2 },
21611           {  0,  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  2 },
21612           {  0,  0,  0,  0,  0,  0,  9,-11,  0,  0,  0,  0,  0, -2 },
21613           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0, -1 },
21614           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
21615           {  0,  0,  1, -1,  1,  0, -4,  5,  0,  0,  0,  0,  0,  0 },
21616           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0,  0 },
21617           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -1,  0,  0,  0,  2 },
21618 
21619        /* 151-160 */
21620           {  1,  0,  0, -1,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21621           {  0,  0,  1,  1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21622           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -4, 10,  0,  0,  0 },
21623           {  0,  0,  0,  0,  1,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21624           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
21625           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0,  0 },
21626           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  2 },
21627           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0, -2 },
21628           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0, -2 },
21629           {  0,  0,  2, -2,  1,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
21630 
21631        /* 161-170 */
21632           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0, -1,  0,  0,  2 },
21633           {  0,  0,  0,  0,  0,  0,  0,  4, -3,  0,  0,  0,  0,  2 },
21634           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  0,  2,  0 },
21635           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0, -1 },
21636           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0, -1 },
21637           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0,  0 },
21638           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  1 },
21639           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0 },
21640           {  0,  0,  2, -2,  1,  0,  0, -9, 13,  0,  0,  0,  0,  0 },
21641           {  2,  0,  2,  0,  2,  0,  0,  2,  0, -3,  0,  0,  0,  0 },
21642 
21643        /* 171-180 */
21644           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0, -2 },
21645           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21646           {  1,  0,  0, -1, -1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21647           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0, -2 },
21648           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0,  0 },
21649           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  1 },
21650           {  1,  0,  2,  0,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21651           {  1,  0, -2,  0, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21652           {  0,  0,  0,  0,  1,  0,  0, -2,  4,  0,  0,  0,  0,  0 },
21653           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0 },
21654 
21655        /* 181-190 */
21656           {  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  0,  2 },
21657           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  1 },
21658           {  0,  0,  2,  0,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21659           {  0,  0,  0,  0,  0,  0,  0,  1, -8,  3,  0,  0,  0, -2 },
21660           {  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0, -2 },
21661           {  0,  0,  0,  0,  0,  0,  0,  7, -8,  3,  0,  0,  0,  2 },
21662           {  0,  0,  0,  0,  1,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
21663           {  0,  0,  1, -1,  1,  0, -1,  0,  0,  0,  0,  0,  0,  0 },
21664           {  0,  0,  1, -1,  0,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21665           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  1 },
21666 
21667        /* 191-200 */
21668           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -1,  0,  0,  0,  0 },
21669           {  0,  0,  0,  0,  0,  0,  7,-10,  0,  0,  0,  0,  0, -2 },
21670           {  1,  0,  0, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21671           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0 },
21672           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  2, -5,  0,  0,  0 },
21673           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0, -1 },
21674           {  0,  0,  1, -1,  1,  0,  0, -9, 15,  0,  0,  0,  0,  0 },
21675           {  0,  0,  0,  0,  1,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
21676           {  0,  0,  0,  0,  1,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
21677           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0 },
21678 
21679        /* 201-210 */
21680           {  0,  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0, -2 },
21681           {  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  2 },
21682           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -1,  0,  0,  2 },
21683           {  2,  0,  0, -2,  1,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21684           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0, -1 },
21685           {  0,  0,  1, -1,  1,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
21686           {  0,  0,  1, -1,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
21687           {  0,  0,  1, -1,  1,  0,  8,-14,  0,  0,  0,  0,  0,  0 },
21688           {  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0 },
21689           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21690 
21691        /* 211-220 */
21692           {  0,  0,  0,  0,  1,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
21693           {  0,  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0 },
21694           {  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  0,  0 },
21695           {  2,  0,  0, -2,  1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21696           {  0,  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  2 },
21697           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  1,  0,  0,  2 },
21698           {  2,  0, -1, -1,  0,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
21699           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0, -2 },
21700           {  0,  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0 },
21701           {  0,  0,  1, -1,  1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21702 
21703        /* 221-230 */
21704           {  2,  0,  0, -2,  0,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
21705           {  2,  0,  0, -2,  0,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
21706           {  0,  0,  0,  0,  1,  0,  0,  0,  0, -1,  0,  0,  0,  0 },
21707           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  1 },
21708           {  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  0,  1 },
21709           {  0,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  0,  0,  2 },
21710           {  0,  0,  0,  0,  1,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21711           {  0,  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0 },
21712           {  0,  0,  0,  0,  0,  0,  3, -9,  4,  0,  0,  0,  0, -2 },
21713           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0, -2 },
21714 
21715        /* 231-240 */
21716           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -4,  0,  0,  0, -2 },
21717           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  1 },
21718           {  0,  0,  0,  0,  0,  0,  7,-11,  0,  0,  0,  0,  0, -2 },
21719           {  0,  0,  0,  0,  0,  0,  3, -5,  4,  0,  0,  0,  0,  2 },
21720           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -1,  1,  0,  0,  0 },
21721           {  2,  0,  0,  0,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21722           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0, -2 },
21723           {  0,  0,  1, -1,  2,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21724           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  2 },
21725           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0, -1 },
21726 
21727        /* 241-250 */
21728           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  1,  0,  0,  0 },
21729           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0,  1 },
21730           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0 },
21731           {  0,  0,  0,  0,  0,  0,  0,  3, -8,  3,  0,  0,  0,  0 },
21732           {  0,  0,  1, -1,  1,  0,  2, -4,  0, -3,  0,  0,  0,  0 },
21733           {  0,  0,  0,  0,  1,  0,  3, -5,  0,  2,  0,  0,  0,  0 },
21734           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -3,  0,  0,  0,  2 },
21735           {  0,  0,  2, -2,  2,  0, -8, 11,  0,  0,  0,  0,  0,  0 },
21736           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  3,  0,  0,  0,  0 },
21737           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -2,  0,  0,  0 },
21738 
21739        /* 251-260 */
21740           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  1,  0,  0,  2 },
21741           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0, -2 },
21742           {  0,  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  2 },
21743           {  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  0, -1 },
21744           {  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0, -1 },
21745           {  0,  0,  0,  0,  0,  0,  2, -1,  0,  0,  0,  0,  0,  0 },
21746           {  1,  0, -2, -2, -2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21747           {  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  2 },
21748           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  5,  0,  0,  2 },
21749           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  1 },
21750 
21751        /* 261-270 */
21752           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  2 },
21753           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  2, -5,  0,  0,  2 },
21754           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  0,  5,  0,  0,  0 },
21755           {  2,  0,  0, -2, -1,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21756           {  1,  0,  0, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21757           {  0,  0,  0,  0,  0,  0,  8, -8,  0,  0,  0,  0,  0,  0 },
21758           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  2, -5,  0,  0,  2 },
21759           {  0,  0,  0,  0,  1,  0,  3, -7,  4,  0,  0,  0,  0,  0 },
21760           {  0,  0,  2, -2,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
21761           {  0,  0,  0,  0,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21762 
21763        /* 271-280 */
21764           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21765           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -3,  0,  0,  0,  0 },
21766           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  1 },
21767           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0, -2 },
21768           {  0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  0,  0,  2 },
21769           {  0,  0,  0,  0,  0,  0,  0,  6,-15,  0,  0,  0,  0, -2 },
21770           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  1,  0,  0,  0,  2 },
21771           {  1,  0,  0, -1,  0,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21772           {  0,  0,  0,  0,  1,  0, -3,  7, -4,  0,  0,  0,  0,  0 },
21773           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -2,  0,  0,  0,  2 },
21774 
21775        /* 281-290 */
21776           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0,  1 },
21777           {  0,  0,  2, -2,  2,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21778           {  0,  0,  2, -2,  2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21779           {  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  2 },
21780           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0 },
21781           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  2 },
21782           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0, -2 },
21783           {  0,  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0 },
21784           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0,  0 },
21785           {  0,  0,  0,  0,  0,  0,  0,  6,-11,  0,  0,  0,  0, -2 },
21786 
21787        /* 291-300 */
21788           {  0,  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0, -2 },
21789           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
21790           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21791           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0,  1 },
21792           {  0,  0,  0,  0,  0,  0,  9,-12,  0,  0,  0,  0,  0, -2 },
21793           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  1 },
21794           {  0,  0,  1, -1,  0,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
21795           {  0,  0,  1, -1,  1,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
21796           {  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  0, -1 },
21797           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0, -1 },
21798 
21799        /* 301-310 */
21800           {  0,  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  2 },
21801           {  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0,  0, -2 },
21802           {  0,  0,  1, -1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21803           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0, -1 },
21804           {  0,  0,  1, -1, -1,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21805           {  0,  0,  0,  0,  0,  0,  0,  1, -5,  0,  0,  0,  0, -2 },
21806           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  3, -1,  0,  0,  0 },
21807           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -2,  0,  0,  0 },
21808           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0,  0 },
21809           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0,  2 },
21810 
21811        /* 311-320 */
21812           {  0,  0,  0,  0,  0,  0,  9, -9,  0,  0,  0,  0,  0, -1 },
21813           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  3,  0,  0,  0 },
21814           {  0,  0,  0,  0,  1,  0,  0,  2, -4,  0,  0,  0,  0,  0 },
21815           {  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  0,  2 },
21816           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  1 },
21817           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21818           {  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0,  0, -2 },
21819           {  0,  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  2 },
21820           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  2 },
21821           {  0,  0,  2,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21822 
21823        /* 321-330 */
21824           {  0,  0,  2,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21825           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -3,  0,  0,  0,  2 },
21826           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  0 },
21827           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
21828           {  0,  0,  0,  0,  0,  0,  4, -3,  0,  0,  0,  0,  0,  2 },
21829           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  2 },
21830           {  0,  0,  0,  0,  0,  0,  5,-10,  0,  0,  0,  0,  0, -2 },
21831           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0,  1 },
21832           {  0,  0,  2, -2,  1, -1,  0,  2,  0,  0,  0,  0,  0,  0 },
21833           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  2,  0,  0 },
21834 
21835        /* 331-340 */
21836           {  0,  0,  0,  0,  1,  0,  3, -5,  0,  0,  0,  0,  0,  0 },
21837           {  1,  0,  0, -2,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21838           {  0,  0,  2, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21839           {  0,  0,  0,  0,  0,  0,  9, -9,  0,  0,  0,  0,  0,  0 },
21840           {  0,  0,  2,  0,  2,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21841           {  0,  0,  2, -2,  1,  0,  0, -8, 11,  0,  0,  0,  0,  0 },
21842           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  0,  2,  0,  0,  0 },
21843           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  2,  0,  0,  0 },
21844           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  2 },
21845           {  0,  0,  0,  0,  0,  0,  2, -6,  0,  0,  0,  0,  0, -2 },
21846 
21847        /* 341-350 */
21848           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0, -1 },
21849           {  0,  0,  0,  0,  0,  0,  0,  5, -2,  0,  0,  0,  0,  2 },
21850           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  2 },
21851           {  0,  0,  0,  0,  0,  0,  0,  7,-13,  0,  0,  0,  0, -2 },
21852           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -2,  0,  0,  0,  0 },
21853           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  3,  0,  0,  0,  2 },
21854           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21855           {  0,  0,  0,  0,  0,  0,  8, -8,  0,  0,  0,  0,  0, -1 },
21856           {  0,  0,  0,  0,  0,  0,  8,-10,  0,  0,  0,  0,  0, -1 },
21857           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  1 },
21858 
21859        /* 351-360 */
21860           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0, -1 },
21861           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0, -1 },
21862           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  2 },
21863           {  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  2 },
21864           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -4,  0,  0,  0,  0 },
21865           {  2,  0,  0, -2, -1,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
21866           {  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0, -2 },
21867           {  2,  0, -1, -1, -1,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
21868           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0 },
21869           {  0,  0,  2,  0,  2,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
21870 
21871        /* 361-370 */
21872           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  4, -3,  0,  0,  0 },
21873           {  0,  0,  0,  0,  0,  0,  0,  6,-11,  0,  0,  0,  0,  0 },
21874           {  2,  0,  0, -2,  1,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
21875           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  1,  5,  0,  0, -2 },
21876           {  0,  0,  0,  0,  0,  0,  0,  6, -5,  0,  0,  0,  0,  2 },
21877           {  1,  0, -2, -2, -2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21878           {  0,  0,  1, -1,  2,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21879           {  0,  0,  0,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21880           {  0,  0,  0,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21881           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  1 },
21882 
21883        /* 371-380 */
21884           {  0,  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  2 },
21885           {  0,  0,  0,  0,  0,  0,  0,  4,  0,  0, -2,  0,  0,  2 },
21886           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0, -2,  0,  0,  2 },
21887           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  1 },
21888           {  0,  0,  0,  0,  0,  0,  0,  1, -6,  0,  0,  0,  0, -2 },
21889           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  2 },
21890           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  2 },
21891           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  2,  0,  0,  0,  0 },
21892           {  0,  0,  0,  0,  0,  0,  0,  7,-13,  0,  0,  0,  0,  0 },
21893           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  2 },
21894 
21895        /* 381-390 */
21896           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21897           {  0,  0,  0,  0,  1,  0,  0, -8, 15,  0,  0,  0,  0,  0 },
21898           {  2,  0,  0, -2, -2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21899           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21900           {  1,  0,  2, -2,  2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21901           {  1,  0, -1,  1, -1,  0,-18, 17,  0,  0,  0,  0,  0,  0 },
21902           {  0,  0,  2,  0,  2,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21903           {  0,  0,  2,  0,  2,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21904           {  0,  0,  2, -2, -1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21905           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21906 
21907        /* 391-400 */
21908           {  0,  0,  0,  0,  1,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
21909           {  0,  0,  0,  0,  0,  0,  8,-16,  0,  0,  0,  0,  0, -2 },
21910           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  2 },
21911           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  2 },
21912           {  0,  0,  0,  0,  2,  0,  0, -1,  2,  0,  0,  0,  0,  0 },
21913           {  2,  0, -1, -1, -2,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21914           {  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0, -1 },
21915           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -2,  4,  0,  0,  0 },
21916           {  0,  0,  0,  0,  0,  0,  0,  2,  2,  0,  0,  0,  0,  2 },
21917           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  4, -5,  0,  0,  0 },
21918 
21919        /* 401-410 */
21920           {  2,  0,  0, -2, -1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21921           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21922           {  1,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21923           {  1,  0,  0, -1, -1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21924           {  1,  0, -1, -1, -1,  0, 20,-20,  0,  0,  0,  0,  0,  0 },
21925           {  0,  0,  2, -2,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21926           {  0,  0,  1, -1,  1,  0,  1, -2,  0,  0,  0,  0,  0,  0 },
21927           {  0,  0,  1, -1,  1,  0, -2,  1,  0,  0,  0,  0,  0,  0 },
21928           {  0,  0,  0,  0,  1,  0,  5, -8,  0,  0,  0,  0,  0,  0 },
21929           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  0, -1,  0,  0,  0 },
21930 
21931        /* 411-420 */
21932           {  0,  0,  0,  0,  0,  0,  9,-11,  0,  0,  0,  0,  0, -1 },
21933           {  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  0,  1 },
21934           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0, -1 },
21935           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  1 },
21936           {  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  0,  0 },
21937           {  0,  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  0 },
21938           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0, -2 },
21939           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0, -2,  0,  0,  0 },
21940           {  0,  0,  1, -1,  2,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21941           {  0,  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0 },
21942 
21943        /* 421-430 */
21944           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0,  0 },
21945           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0, -2 },
21946           {  0,  0,  0,  0,  0,  0,  0,  2, -6,  0,  0,  0,  0, -2 },
21947           {  1,  0,  0, -2,  0,  0, 20,-21,  0,  0,  0,  0,  0,  0 },
21948           {  0,  0,  0,  0,  0,  0,  8,-12,  0,  0,  0,  0,  0,  0 },
21949           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0,  0 },
21950           {  0,  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0 },
21951           {  0,  0,  1, -1,  2,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21952           {  0,  0,  0,  0,  0,  0,  8,-12,  0,  0,  0,  0,  0, -2 },
21953           {  0,  0,  0,  0,  0,  0,  0,  9,-17,  0,  0,  0,  0,  0 },
21954 
21955        /* 431-440 */
21956           {  0,  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  2 },
21957           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  1,  5,  0,  0,  2 },
21958           {  0,  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0, -2 },
21959           {  0,  0,  0,  0,  0,  0,  0,  2, -7,  0,  0,  0,  0, -2 },
21960           {  1,  0,  0, -1,  1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21961           {  1,  0, -2,  0, -2,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
21962           {  0,  0,  0,  0,  1,  0,  0, -9, 17,  0,  0,  0,  0,  0 },
21963           {  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0,  0, -2 },
21964           {  1,  0, -2, -2, -2,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21965           {  1,  0, -1,  1, -1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21966 
21967        /* 441-450 */
21968           {  0,  0,  2, -2,  2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21969           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
21970           {  0,  0,  1, -1,  2,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21971           {  0,  0,  0,  0,  1,  0,  0,  2, -2,  0,  0,  0,  0,  0 },
21972           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0, -1 },
21973           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0, -2 },
21974           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0,  0 },
21975           {  0,  0,  0,  0,  0,  0,  0,  5,-10,  0,  0,  0,  0, -2 },
21976           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -4,  0,  0,  0,  2 },
21977           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -5,  0,  0,  0, -2 },
21978 
21979        /* 451-460 */
21980           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -5,  0,  0,  0, -2 },
21981           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  5,  0,  0,  2 },
21982           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  0,  0,  0, -2 },
21983           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0,  1 },
21984           {  1,  0,  0, -2,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21985           {  0,  0,  0,  0,  0,  0,  3, -7,  4,  0,  0,  0,  0,  0 },
21986           {  2,  0,  2,  0,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21987           {  0,  0,  1, -1, -1,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21988           {  0,  0,  0,  0,  1,  0,  0,  1,  0, -2,  0,  0,  0,  0 },
21989           {  0,  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0, -2 },
21990 
21991        /* 461-470 */
21992           {  1,  0,  0, -1,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21993           {  0,  0,  2, -2,  1,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21994           {  0,  0,  2, -2,  1,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21995           {  0,  0,  2, -2,  1,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21996           {  0,  0,  2, -2,  1,  0,  0, -3,  0,  3,  0,  0,  0,  0 },
21997           {  0,  0,  2, -2,  1,  0, -5,  5,  0,  0,  0,  0,  0,  0 },
21998           {  0,  0,  1, -1,  1,  0,  1, -3,  0,  0,  0,  0,  0,  0 },
21999           {  0,  0,  1, -1,  1,  0,  0, -4,  6,  0,  0,  0,  0,  0 },
22000           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0, -1,  0,  0 },
22001           {  0,  0,  1, -1,  1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
22002 
22003        /* 471-480 */
22004           {  0,  0,  0,  0,  1,  0,  3, -4,  0,  0,  0,  0,  0,  0 },
22005           {  0,  0,  0,  0,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22006           {  0,  0,  0,  0,  0,  0,  7,-10,  0,  0,  0,  0,  0, -1 },
22007           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  1 },
22008           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0, -2 },
22009           {  0,  0,  0,  0,  0,  0,  3, -8,  0,  0,  0,  0,  0, -2 },
22010           {  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0,  0, -1 },
22011           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0, -1 },
22012           {  0,  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  2 },
22013           {  0,  0,  0,  0,  0,  0,  0,  7, -8,  0,  0,  0,  0,  2 },
22014 
22015        /* 481-490 */
22016           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  2 },
22017           {  0,  0,  0,  0,  0,  0,  0,  3, -8,  3,  0,  0,  0, -2 },
22018           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -2,  0,  0,  1 },
22019           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  1 },
22020           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0, -1 },
22021           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0, -1 },
22022           {  2,  0,  0, -2, -1,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
22023           {  2,  0, -1, -1,  1,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
22024           {  0,  0,  2, -2,  1,  0,  0, -7,  9,  0,  0,  0,  0,  0 },
22025           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0, -1 },
22026 
22027        /* 491-500 */
22028           {  0,  0,  1, -1,  2,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
22029           {  1,  0,  0,  0,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22030           {  1,  0,  0, -2,  0,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
22031           {  0,  0,  0,  0,  0,  0,  7, -8,  0,  0,  0,  0,  0,  0 },
22032           {  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0 },
22033           {  2,  0,  0, -2,  1,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
22034           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  3, -1,  0,  0,  0 },
22035           {  1,  0,  1,  1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22036           {  1,  0,  0, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22037           {  1,  0,  0, -2, -1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22038 
22039        /* 501-510 */
22040           {  1,  0,  0, -1, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
22041           {  1,  0, -1,  0, -1,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
22042           {  0,  0,  2, -2,  1,  0,  0, -4,  4,  0,  0,  0,  0,  0 },
22043           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  0,  0,  0,  0,  0 },
22044           {  0,  0,  2, -2,  1,  0, -8, 11,  0,  0,  0,  0,  0,  0 },
22045           {  0,  0,  2, -2,  0,  0,  0, -9, 13,  0,  0,  0,  0,  0 },
22046           {  0,  0,  1,  1,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22047           {  0,  0,  1, -1,  1,  0,  0,  1, -4,  0,  0,  0,  0,  0 },
22048           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  1, -3,  0,  0,  0 },
22049           {  0,  0,  0,  0,  1,  0,  0,  7,-13,  0,  0,  0,  0,  0 },
22050 
22051        /* 511-520 */
22052           {  0,  0,  0,  0,  1,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22053           {  0,  0,  0,  0,  1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22054           {  0,  0,  0,  0,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22055           {  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0,  0,  0 },
22056           {  0,  0,  0,  0,  0,  0,  7,-11,  0,  0,  0,  0,  0, -1 },
22057           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0,  1 },
22058           {  0,  0,  0,  0,  0,  0,  6, -4,  0,  0,  0,  0,  0,  1 },
22059           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0, -1 },
22060           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  0 },
22061           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0,  1 },
22062 
22063        /* 521-530 */
22064           {  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0,  0, -1 },
22065           {  0,  0,  0,  0,  0,  0,  0,  9,-17,  0,  0,  0,  0, -2 },
22066           {  0,  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  2 },
22067           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  1 },
22068           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0, -1 },
22069           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0,  0 },
22070           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0, -1 },
22071           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  1 },
22072           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0 },
22073           {  2,  0,  0, -2,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22074 
22075        /* 531-540 */
22076           {  2,  0,  0, -2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22077           {  1,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22078           {  1,  0,  0,  0,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22079           {  1,  0,  0,  0,  0,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
22080           {  1,  0,  0, -2,  0,  0, 17,-16,  0, -2,  0,  0,  0,  0 },
22081           {  1,  0,  0, -1,  0,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22082           {  0,  0,  2, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22083           {  0,  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0 },
22084           {  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0 },
22085           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -4,  0,  0,  0,  0 },
22086 
22087        /* 541-550 */
22088           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, -2, -2 },
22089           {  0,  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  2 },
22090           {  2,  0,  0, -2,  0,  0,  0, -4,  4,  0,  0,  0,  0,  0 },
22091           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  2,  2,  0,  0,  0 },
22092           {  1,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22093           {  1,  0,  0,  0,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22094           {  1,  0,  0,  0,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
22095           {  1,  0,  0, -2,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22096           {  1,  0,  0, -2,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22097           {  1,  0,  0, -2,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22098 
22099        /* 551-560 */
22100           {  1,  0,  0, -2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22101           {  0,  0,  2, -2,  0,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
22102           {  0,  0,  1,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22103           {  0,  0,  1, -1,  0,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
22104           {  0,  0,  1, -1,  0,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22105           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22106           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
22107           {  0,  0,  1, -1,  0,  0, -4,  5,  0,  0,  0,  0,  0,  0 },
22108           {  0,  0,  1, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22109           {  0,  0,  0,  2,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22110 
22111        /* 561-570 */
22112           {  0,  0,  0,  0,  0,  0,  8, -9,  0,  0,  0,  0,  0,  0 },
22113           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
22114           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  0 },
22115           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0 },
22116           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0 },
22117           {  2,  0, -2, -2, -2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22118           {  1,  0,  0,  0,  1,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
22119           {  1,  0,  0,  0, -1,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
22120           {  0,  0,  2,  0,  2,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
22121           {  0,  0,  2,  0,  2,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
22122 
22123        /* 571-580 */
22124           {  0,  0,  2,  0,  2,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
22125           {  0,  0,  2,  0,  2,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22126           {  0,  0,  0,  0,  2,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
22127           {  0,  0,  0,  0,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
22128           {  2,  0,  2, -2,  2,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
22129           {  2,  0,  1, -3,  1,  0, -6,  7,  0,  0,  0,  0,  0,  0 },
22130           {  2,  0,  0, -2,  0,  0,  2, -5,  0,  0,  0,  0,  0,  0 },
22131           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  5, -5,  0,  0,  0 },
22132           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  1,  5,  0,  0,  0 },
22133           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  0,  5,  0,  0,  0 },
22134 
22135        /* 581-590 */
22136           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  0,  2,  0,  0,  0 },
22137           {  2,  0,  0, -2,  0,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
22138           {  2,  0, -2,  0, -2,  0,  0,  5, -9,  0,  0,  0,  0,  0 },
22139           {  2,  0, -1, -1,  0,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
22140           {  1,  0,  2,  0,  2,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22141           {  1,  0,  2,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22142           {  1,  0,  2,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22143           {  1,  0,  2,  0,  2,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
22144           {  1,  0,  2, -2,  2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
22145           {  1,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
22146 
22147        /* 591-600 */
22148           {  1,  0,  0,  0,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
22149           {  1,  0,  0, -2,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22150           {  1,  0, -2, -2, -2,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
22151           {  1,  0, -1,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22152           {  1,  0, -1, -1,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
22153           {  0,  0,  2,  2,  2,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22154           {  0,  0,  2, -2,  1,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22155           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  1,  0,  0,  0,  0 },
22156           {  0,  0,  2, -2,  1,  0,  0,-10, 15,  0,  0,  0,  0,  0 },
22157           {  0,  0,  2, -2,  0, -1,  0,  2,  0,  0,  0,  0,  0,  0 },
22158 
22159        /* 601-610 */
22160           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
22161           {  0,  0,  1, -1,  2,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22162           {  0,  0,  1, -1,  1,  0, -4,  6,  0,  0,  0,  0,  0,  0 },
22163           {  0,  0,  1, -1,  1,  0, -1,  2,  0,  0,  0,  0,  0,  0 },
22164           {  0,  0,  1, -1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22165           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0, -2,  0,  0,  0 },
22166           {  0,  0,  1, -1,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22167           {  0,  0,  1, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0,  0 },
22168           {  0,  0,  1, -1, -1,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
22169           {  0,  0,  0,  2,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22170 
22171        /* 611-620 */
22172           {  0,  0,  0,  2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22173           {  0,  0,  0,  0,  2,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
22174           {  0,  0,  0,  0,  1,  0, -1,  2,  0,  0,  0,  0,  0,  0 },
22175           {  0,  0,  0,  0,  0,  0,  9,-13,  0,  0,  0,  0,  0, -2 },
22176           {  0,  0,  0,  0,  0,  0,  8,-14,  0,  0,  0,  0,  0, -2 },
22177           {  0,  0,  0,  0,  0,  0,  8,-11,  0,  0,  0,  0,  0, -1 },
22178           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0,  0 },
22179           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0,  0 },
22180           {  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  0, -1 },
22181           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0, -2 },
22182 
22183        /* 621-630 */
22184           {  0,  0,  0,  0,  0,  0,  5, -6, -4,  0,  0,  0,  0, -2 },
22185           {  0,  0,  0,  0,  0,  0,  5, -4,  0,  0,  0,  0,  0,  2 },
22186           {  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0,  0, -2 },
22187           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0,  0 },
22188           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  2,  0,  0,  0,  2 },
22189           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  0 },
22190           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0 },
22191           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0, -2 },
22192           {  0,  0,  0,  0,  0,  0,  0,  7,-12,  0,  0,  0,  0, -2 },
22193           {  0,  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0, -2 },
22194 
22195        /* 631-640 */
22196           {  0,  0,  0,  0,  0,  0,  0,  6, -8,  1,  5,  0,  0,  2 },
22197           {  0,  0,  0,  0,  0,  0,  0,  6, -4,  0,  0,  0,  0,  2 },
22198           {  0,  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0 },
22199           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -4,  0,  0,  0,  2 },
22200           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0, -1 },
22201           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  3,  0,  0,  0,  2 },
22202           {  0,  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0, -2 },
22203           {  0,  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0 },
22204           {  0,  0,  0,  0,  0,  0,  0,  5,-16,  4,  5,  0,  0, -2 },
22205           {  0,  0,  0,  0,  0,  0,  0,  5,-13,  0,  0,  0,  0, -2 },
22206 
22207        /* 641-650 */
22208           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -5,  0,  0,  0, -2 },
22209           {  0,  0,  0,  0,  0,  0,  0,  3, -9,  0,  0,  0,  0, -2 },
22210           {  0,  0,  0,  0,  0,  0,  0,  3, -7,  0,  0,  0,  0, -2 },
22211           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  2,  0,  0,  0,  2 },
22212           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -3,  0,  0,  0 },
22213           {  0,  0,  0,  0,  0,  0,  0,  2, -8,  1,  5,  0,  0, -2 },
22214           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1, -5,  0,  0,  0 },
22215           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  2,  0,  0,  2 },
22216           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -3,  0,  0,  0 },
22217           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  5,  0,  0,  0 },
22218 
22219        /* 651-NFPL */
22220           {  0,  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0 },
22221           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -6,  3,  0, -2 },
22222           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0 },
22223           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0 },
22224           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2 },
22225           {  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0 }
22226        };
22227 
22228       /**
22229        *
22230        *  Time scale transformation:  Terrestrial Time, TT, to International
22231        *  Atomic Time, TAI.
22232        *
22233        * <p>This function is derived from the International Astronomical Union's
22234        *  SOFA (Standards of Fundamental Astronomy) software collection.
22235        *
22236        *<p>Status:  canonical.
22237        *
22238        *<!-- Given: -->
22239        *     tt1,tt2    double    TT as a 2-part Julian Date
22240        *
22241        *<!-- Returned:-->
22242        *     tai1,tai2  double    TAI as a 2-part Julian Date
22243        *
22244        *  Returned (function value):
22245        *                int       status:  0 = OK
22246        *
22247        *  Note:
22248        *
22249        *     tt1+tt2 is Julian Date, apportioned in any convenient way between
22250        *     the two arguments, for example where tt1 is the Julian Day Number
22251        *     and tt2 is the fraction of a day.  The returned tai1,tai2 follow
22252        *     suit.
22253        *
22254        *<p>References:
22255        *
22256        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22257        *     IERS Technical Note No. 32, BKG (2004)
22258        *
22259        *     Explanatory Supplement to the Astronomical Almanac,
22260        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22261        *
22262        *@version 2010 May 13
22263        *
22264        *@since SOFA release 2010-12-01
22265        *
22266        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22267        */
22268       public static JulianDate jauTttai(double tt1, double tt2)
22269       {
22270           double tai1, tai2;
22271           /* TT minus TAI (days). */
22272           final double dtat = TTMTAI / 86400.0;
22273 
22274 
22275           /* Result, safeguarding precision. */
22276           if ( tt1 > tt2 ) {
22277               tai1 = tt1;
22278               tai2 = tt2 - dtat;
22279           } else {
22280               tai1 = tt1 - dtat;
22281               tai2 = tt2;
22282           }
22283 
22284           return new JulianDate(tai1, tai2);
22285 
22286       };
22287 
22288       /**
22289        *
22290        *  Time scale transformation:  Terrestrial Time, TT, to Geocentric
22291        *  Coordinate Time, TCG.
22292        *
22293        * <p>This function is derived from the International Astronomical Union's
22294        *  SOFA (Standards of Fundamental Astronomy) software collection.
22295        *
22296        *<p>Status:  canonical.
22297        *
22298        *<!-- Given: -->
22299        *     tt1,tt2    double    TT as a 2-part Julian Date
22300        *
22301        *<!-- Returned:-->
22302        *     tcg1,tcg2  double    TCG as a 2-part Julian Date
22303        *
22304        *  Returned (function value):
22305        *                int       status:  0 = OK
22306        *
22307        *  Note:
22308        *
22309        *     tt1+tt2 is Julian Date, apportioned in any convenient way between
22310        *     the two arguments, for example where tt1 is the Julian Day Number
22311        *     and tt2 is the fraction of a day.  The returned tcg1,tcg2 follow
22312        *     suit.
22313        *
22314        *<p>References:
22315        *
22316        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22317        *     IERS Technical Note No. 32, BKG (2004)
22318        *
22319        *     IAU 2000 Resolution B1.9
22320        *
22321        *@version 2010 May 13
22322        *
22323        *@since SOFA release 2010-12-01
22324        *
22325        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22326        */
22327       public static JulianDate jauTttcg(double tt1, double tt2)
22328 
22329       {
22330           double tcg1, tcg2;
22331 
22332           /* 1977 Jan 1 00:00:32.184 TT, as MJD */
22333           final double t77t = DJM77 + TTMTAI/DAYSEC;
22334 
22335           /* TT to TCG rate */
22336           final double elgg = ELG/(1.0-ELG);
22337 
22338 
22339           /* Result, safeguarding precision. */
22340           if ( tt1 > tt2 ) {
22341               tcg1 = tt1;
22342               tcg2 = tt2 + ( ( tt1 - DJM0 ) + ( tt2 - t77t ) ) * elgg;
22343           } else {
22344               tcg1 = tt1 + ( ( tt2 - DJM0 ) + ( tt1 - t77t ) ) * elgg;
22345               tcg2 = tt2;
22346           }
22347 
22348           return new JulianDate(tcg1, tcg2);
22349 
22350       };      
22351 
22352       /**
22353        *
22354        *  Time scale transformation:  Terrestrial Time, TT, to Barycentric
22355        *  Dynamical Time, TDB.
22356        *
22357        * <p>This function is derived from the International Astronomical Union's
22358        *  SOFA (Standards of Fundamental Astronomy) software collection.
22359        *
22360        *<p>Status:  canonical.
22361        *
22362        *<!-- Given: -->
22363        *     tt1,tt2    double    TT as a 2-part Julian Date
22364        *     dtr        double    TDB-TT in seconds
22365        *
22366        *<!-- Returned:-->
22367        *     tdb1,tdb2  double    TDB as a 2-part Julian Date
22368        *
22369        *  Returned (function value):
22370        *                int       status:  0 = OK
22371        *
22372        *<p>Notes:
22373        *
22374        *  1  tt1+tt2 is Julian Date, apportioned in any convenient way between
22375        *     the two arguments, for example where tt1 is the Julian Day Number
22376        *     and tt2 is the fraction of a day.  The returned tdb1,tdb2 follow
22377        *     suit.
22378        *
22379        *  2  The argument dtr represents the quasi-periodic component of the
22380        *     GR transformation between TT and TCB.  It is dependent upon the
22381        *     adopted solar-system ephemeris, and can be obtained by numerical
22382        *     integration, by interrogating a precomputed time ephemeris or by
22383        *     evaluating a model such as that implemented in the SOFA function
22384        *     jauDtdb.   The quantity is dominated by an annual term of 1.7 ms
22385        *     amplitude.
22386        *
22387        *  3  TDB is essentially the same as Teph, the time argument for the JPL
22388        *     solar system ephemerides.
22389        *
22390        *<p>References:
22391        *
22392        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22393        *     IERS Technical Note No. 32, BKG (2004)
22394        *
22395        *     IAU 2006 Resolution 3
22396        *
22397        *@version 2010 May 13
22398        *
22399        *@since SOFA release 2010-12-01
22400        *
22401        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22402        */
22403       public static JulianDate jauTttdb(double tt1, double tt2, double dtr)
22404       {
22405 
22406           double tdb1, tdb2;
22407           double dtrd;
22408 
22409 
22410           /* Result, safeguarding precision. */
22411           dtrd = dtr / DAYSEC;
22412           if ( tt1 > tt2 ) {
22413               tdb1 = tt1;
22414               tdb2 = tt2 + dtrd;
22415           } else {
22416               tdb1 = tt1 + dtrd;
22417               tdb2 = tt2;
22418           }
22419 
22420           return new JulianDate(tdb1, tdb2);
22421 
22422       };
22423 
22424       /**
22425        *
22426        *  Time scale transformation:  Terrestrial Time, TT, to Universal Time,
22427        *  UT1.
22428        *
22429        * <p>This function is derived from the International Astronomical Union's
22430        *  SOFA (Standards of Fundamental Astronomy) software collection.
22431        *
22432        *<p>Status:  canonical.
22433        *
22434        *<!-- Given: -->
22435        *     tt1,tt2    double    TT as a 2-part Julian Date
22436        *     dt         double    TT-UT1 in seconds
22437        *
22438        *<!-- Returned:-->
22439        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22440        *
22441        *  Returned (function value):
22442        *                int       status:  0 = OK
22443        *
22444        *<p>Notes:
22445        *
22446        *  1  tt1+tt2 is Julian Date, apportioned in any convenient way between
22447        *     the two arguments, for example where tt1 is the Julian Day Number
22448        *     and tt2 is the fraction of a day.  The returned ut11,ut12 follow
22449        *     suit.
22450        *
22451        *  2  The argument dt is classical Delta T.
22452        *
22453        *  Reference:
22454        *
22455        *     Explanatory Supplement to the Astronomical Almanac,
22456        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22457        *
22458        *@version 2010 May 16
22459        *
22460        *@since SOFA release 2010-12-01
22461        *
22462        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22463        */
22464       public static JulianDate jauTtut1(double tt1, double tt2, double dt)
22465 
22466       {
22467 
22468           double ut11, ut12;
22469           double dtd;
22470 
22471 
22472           /* Result, safeguarding precision. */
22473           dtd = dt / DAYSEC;
22474           if ( tt1 > tt2 ) {
22475               ut11 = tt1;
22476               ut12 = tt2 - dtd;
22477           } else {
22478               ut11 = tt1 - dtd;
22479               ut12 = tt2;
22480           }
22481 
22482           return new JulianDate(ut11, ut12);
22483       };
22484 
22485       /**
22486        *
22487        *  Time scale transformation:  Universal Time, UT1, to International
22488        *  Atomic Time, TAI.
22489        *
22490        * <p>This function is derived from the International Astronomical Union's
22491        *  SOFA (Standards of Fundamental Astronomy) software collection.
22492        *
22493        *<p>Status:  canonical.
22494        *
22495        *<!-- Given: -->
22496        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22497        *     dta        double    UT1-TAI in seconds
22498        *
22499        *<!-- Returned:-->
22500        *     tai1,tai2  double    TAI as a 2-part Julian Date
22501        *
22502        *  Returned (function value):
22503        *                int       status:  0 = OK
22504        *
22505        *<p>Notes:
22506        *
22507        *  1  ut11+ut12 is Julian Date, apportioned in any convenient way
22508        *     between the two arguments, for example where ut11 is the Julian
22509        *     Day Number and ut12 is the fraction of a day.  The returned
22510        *     TAI1,TAI2 follow suit.
22511        *
22512        *  2  The argument dta, i.e. UT1-TAI, is an observed quantity, and is
22513        *     available from IERS tabulations.
22514        *
22515        *  Reference:
22516        *
22517        *     Explanatory Supplement to the Astronomical Almanac,
22518        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22519        *
22520        *@version 2010 May 16
22521        *
22522        *@since SOFA release 2010-12-01
22523        *
22524        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22525        */
22526       public static JulianDate jauUt1tai(double ut11, double ut12, double dta )
22527 
22528       {
22529           double tai1, tai2;
22530           double dtad;
22531 
22532 
22533           /* Result, safeguarding precision. */
22534           dtad = dta / DAYSEC;
22535           if ( ut11 > ut12 ) {
22536               tai1 = ut11;
22537               tai2 = ut12 - dtad;
22538           } else {
22539               tai1 = ut11 - dtad;
22540               tai2 = ut12;
22541           }
22542           return new JulianDate(tai1, tai2);
22543 
22544       };
22545 
22546       /**
22547        *
22548        *  Time scale transformation:  Universal Time, UT1, to Terrestrial
22549        *  Time, TT.
22550        *
22551        * <p>This function is derived from the International Astronomical Union's
22552        *  SOFA (Standards of Fundamental Astronomy) software collection.
22553        *
22554        *<p>Status:  canonical.
22555        *
22556        *<!-- Given: -->
22557        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22558        *     dt         double    TT-UT1 in seconds
22559        *
22560        *<!-- Returned:-->
22561        *     tt1,tt2    double    TAI as a 2-part Julian Date
22562        *
22563        *  Returned (function value):
22564        *                int       status:  0 = OK
22565        *
22566        *<p>Notes:
22567        *
22568        *  1  ut11+ut12 is Julian Date, apportioned in any convenient way
22569        *     between the two arguments, for example where ut11 is the Julian
22570        *     Day Number and ut12 is the fraction of a day.  The returned
22571        *     tt1,tt2 follow suit.
22572        *
22573        *  2  The argument dt is classical Delta T.
22574        *
22575        *  Reference:
22576        *
22577        *     Explanatory Supplement to the Astronomical Almanac,
22578        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22579        *
22580        *@version 2010 May 16
22581        *
22582        *@since SOFA release 2010-12-01
22583        *
22584        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22585        */
22586       public static JulianDate jauUt1tt(double ut11, double ut12, double dt)
22587       {
22588 
22589           double tt1, tt2;
22590           double dtd;
22591 
22592 
22593           /* Result, safeguarding precision. */
22594           dtd = dt / DAYSEC;
22595           if ( ut11 > ut12 ) {
22596               tt1 = ut11;
22597               tt2 = ut12 + dtd;
22598           } else {
22599               tt1 = ut11 + dtd;
22600               tt2 = ut12;
22601           }
22602 
22603           return new JulianDate(tt1, tt2);
22604 
22605       };
22606 
22607       /**
22608        *
22609        *  Time scale transformation:  Universal Time, UT1, to Coordinated
22610        *  Universal Time, UTC.
22611        *
22612        * <p>This function is derived from the International Astronomical Union's
22613        *  SOFA (Standards of Fundamental Astronomy) software collection.
22614        *
22615        *<p>Status:  canonical.
22616        *
22617        *<!-- Given: -->
22618        *     @param ut11 double   UT1 as a 2-part Julian Date (Note 1)
22619        *     @param ut12 double   UT1 as a 2-part Julian Date (Note 1) 
22620        *     dut1       double   Delta UT1: UT1-UTC in seconds (Note 2)
22621        *
22622        *<!-- Returned:-->
22623        *     @return  JulianDate   UTC as a 2-part quasi Julian Date (Notes 3,4)
22624        *
22625        *  Returned (function value):
22626        *                int      status: +1 = dubious year (Note 5)
22627        *                                  0 = OK
22628        *                                 -1 = unacceptable date
22629        *
22630        *<p>Notes:
22631        *<ol>
22632        *  <li>  ut11+ut12 is Julian Date, apportioned in any convenient way
22633        *     between the two arguments, for example where ut11 is the Julian
22634        *     Day Number and ut12 is the fraction of a day.  The returned utc1
22635        *     and utc2 form an analogous pair, except that a special convention
22636        *     is used, to deal with the problem of leap seconds - see Note 3.
22637        *
22638        *  <li> Delta UT1 can be obtained from tabulations provided by the
22639        *     International Earth Rotation and Reference Systems Service.  The
22640        *     value changes abruptly by 1s at a leap second;  however, close to
22641        *     a leap second the algorithm used here is tolerant of the "wrong"
22642        *     choice of value being made.
22643        *
22644        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22645        *     special measures are taken.  The convention in the present
22646        *     function is that the returned quasi JD day UTC1+UTC2 represents
22647        *     UTC days whether the length is 86399, 86400 or 86401 SI seconds.
22648        *
22649        *  <li> The function jauD2dtf can be used to transform the UTC quasi-JD
22650        *     into calendar date and clock time, including UTC leap second
22651        *     handling.
22652        *
22653        *  <li> The warning status "dubious year" flags UTCs that predate the
22654        *     introduction of the time scale and that are too far in the future
22655        *     to be trusted.  See jauDat for further details.
22656        *</ol>
22657        *  Called:
22658        *  <ul>
22659        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22660        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22661        *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
22662        *</ul>
22663        *<p>References:
22664        *
22665        *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22666        *     IERS Technical Note No. 32, BKG (2004)
22667        *
22668        *     <p>Explanatory Supplement to the Astronomical Almanac,
22669        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22670        *
22671        *@version 2010 May 16
22672        *
22673        *@since SOFA release 2010-12-01
22674        *
22675        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22676        * @throws JSOFAIllegalParameter 
22677        * @throws JSOFAInternalError 
22678        */
22679       public static JulianDate jauUt1utc(double ut11, double ut12, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22680 
22681       {
22682 
22683           double utc1, utc2;
22684           boolean big1;
22685           int i;
22686           double duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du;
22687 
22688 
22689           /* UT1-UTC in seconds. */
22690           duts = dut1;
22691 
22692           /* Put the two parts of the UT1 into big-first order. */
22693           big1 = ( ut11 >= ut12 );
22694           if ( big1 ) {
22695               u1 = ut11;
22696               u2 = ut12;
22697           } else {
22698               u1 = ut12;
22699               u2 = ut11;
22700           }
22701 
22702           /* See if the UT1 can possibly be in a leap-second day. */
22703           d1 = u1;
22704           dats1 = 0;
22705           for ( i = -1; i <= 3; i++ ) {
22706               d2 = u2 + (double) i;
22707               Calendar dt = jauJd2cal(d1, d2 );
22708               dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
22709               if ( i == - 1 ) dats1 = dats2;
22710               ddats = dats2 - dats1;
22711               if ( abs(ddats) >= 0.5 ) {
22712 
22713                   /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */
22714                   if ( ddats * duts >= 0 ) duts -= ddats;
22715 
22716                   /* UT1 for the start of the UTC day that ends in a leap. */
22717                   JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
22718                   d1 = jd.djm0; d2 = jd.djm1;
22719                   us1 = d1;
22720                   us2 = d2 - 1.0 + duts/DAYSEC;
22721 
22722                   /* Is the UT1 after this point? */
22723                   du = u1 - us1;
22724                   du += u2 - us2;
22725                   if ( du > 0 ) {
22726 
22727                       /* Yes:  fraction of the current UTC day that has elapsed. */
22728                       fd = du * DAYSEC / ( DAYSEC + ddats );
22729 
22730                       /* Ramp UT1-UTC to bring about SOFA's JD(UTC) convention. */
22731                       duts += ddats * ( fd <= 1.0 ? fd : 1.0 );
22732                   }
22733 
22734                   /* Done. */
22735                   break;
22736               }
22737               dats1 = dats2;
22738           }
22739 
22740           /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */
22741           u2 -= duts / DAYSEC;
22742 
22743           /* Result, safeguarding precision. */
22744           if ( big1 ) {
22745               utc1 = u1;
22746               utc2 = u2;
22747           } else {
22748               utc1 = u2;
22749               utc2 = u1;
22750           }
22751 
22752           /* FIXME Status. */
22753           return new JulianDate(utc1, utc2);
22754 
22755       };
22756 
22757       /**
22758        *
22759        *  Time scale transformation:  Coordinated Universal Time, UTC, to
22760        *  International Atomic Time, TAI.
22761        *
22762        * <p>This function is derived from the International Astronomical Union's
22763        *  SOFA (Standards of Fundamental Astronomy) software collection.
22764        *
22765        *<p>Status:  canonical.
22766        *
22767        *<!-- Given: -->
22768        *     @param utc1 double   UTC as a 2-part quasi Julian Date (Notes 1-4)
22769        *     @param utc2 double   UTC as a 2-part quasi Julian Date (Notes 1-4) 
22770        *
22771        *<!-- Returned:-->
22772        *     @return JulianDate     TAI as a 2-part Julian Date (Note 5)
22773        *
22774        *  Returned (function value):
22775        *                int      status: +1 = dubious year (Note 3)
22776        *                                  0 = OK
22777        *                                 -1 = unacceptable date
22778        *
22779        *<p>Notes:
22780        *<ol>
22781        *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22782        *     convenient way between the two arguments, for example where utc1
22783        *     is the Julian Day Number and utc2 is the fraction of a day.
22784        *
22785        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22786        *     special measures are taken.  The convention in the present
22787        *     function is that the JD day represents UTC days whether the
22788        *     length is 86399, 86400 or 86401 SI seconds.
22789        *
22790        *  <li> The warning status "dubious year" flags UTCs that predate the
22791        *     introduction of the time scale and that are too far in the future
22792        *     to be trusted.  See jauDat  for further details.
22793        *
22794        *  <li> The function jauDtf2d converts from calendar date and time of day
22795        *     into 2-part Julian Date, and in the case of UTC implements the
22796        *     leap-second-ambiguity convention described above.
22797        *
22798        *  <li> The returned TAI1,TAI2 are such that their sum is the TAI Julian
22799        *     Date.
22800        *</ol>
22801        *  Called:<ul>
22802        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22803        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22804        *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
22805        *</ul>
22806        *<p>References:
22807        *
22808        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22809        *     IERS Technical Note No. 32, BKG (2004)
22810        *
22811        *     Explanatory Supplement to the Astronomical Almanac,
22812        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22813        *
22814        *@version 2010 September 10
22815        *
22816        *@since SOFA release 2010-12-01
22817        *
22818        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22819      * @throws JSOFAInternalError 
22820      * @throws JSOFAIllegalParameter 
22821        *
22822        */
22823       public static JulianDate jauUtctai(double utc1, double utc2) throws JSOFAIllegalParameter, JSOFAInternalError
22824 
22825       {
22826           double tai1, tai2;
22827           boolean big1;
22828           double u1, u2,  dats,  datst, ddat, a2, fd;
22829 
22830 
22831           /* Put the two parts of the UTC into big-first order. */
22832           big1 = ( utc1 >= utc2 );
22833           if ( big1 ) {
22834               u1 = utc1;
22835               u2 = utc2;
22836           } else {
22837               u1 = utc2;
22838               u2 = utc1;
22839           }
22840 
22841           /* Get TAI-UTC now. */
22842           Calendar dt = jauJd2cal(u1, u2 );
22843           dats = jauDat(dt.iy, dt.im, dt.id, dt.fd);
22844  //         if ( js < 0 ) return -1;
22845           fd = dt.fd;
22846           /* Get TAI-UTC tomorrow. */
22847           Calendar dtt = jauJd2cal(u1+1.5, u2-fd );
22848           datst = jauDat(dtt.iy, dtt.im, dtt.id, dtt.fd);
22849 //          if ( js < 0 ) return -1;
22850 
22851           /* If today ends in a leap second, scale the fraction into SI days. */
22852           ddat = datst - dats;
22853           if ( abs(ddat) > 0.5 ) fd += fd * ddat / DAYSEC;
22854 
22855           /* Today's calendar date to 2-part JD. */
22856           JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id ) ;
22857 
22858           /* Assemble the TAI result, preserving the UTC split and order. */
22859           a2 = jd.djm0 - u1;
22860           a2 += jd.djm1;
22861           a2 += fd + dats / DAYSEC;
22862           if ( big1 ) {
22863               tai1 = u1;
22864               tai2 = a2;
22865           } else {
22866               tai1 = a2;
22867               tai2 = u1;
22868           }
22869 
22870           /* FIXME Status. */
22871           return new JulianDate(tai1, tai2);
22872 
22873       };
22874 
22875       /**
22876        *
22877        *  Time scale transformation:  Coordinated Universal Time, UTC, to
22878        *  Universal Time, UT1.
22879        *
22880        * <p>This function is derived from the International Astronomical Union's
22881        *  SOFA (Standards of Fundamental Astronomy) software collection.
22882        *
22883        *<p>Status:  canonical.
22884        *
22885        *<!-- Given: -->
22886        *     utc1,utc2  double   UTC as a 2-part quasi Julian Date (Notes 1-4)
22887        *     dut1       double   Delta UT1 = UT1-UTC in seconds (Note 5)
22888        *
22889        *<!-- Returned:-->
22890        *     ut11,ut12  double   UT1 as a 2-part Julian Date (Note 6)
22891        *
22892        *  Returned (function value):
22893        *                int      status: +1 = dubious year (Note 7)
22894        *                                  0 = OK
22895        *                                 -1 = unacceptable date
22896        *
22897        *<p>Notes:
22898        *<ol>
22899        *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22900        *     convenient way between the two arguments, for example where utc1
22901        *     is the Julian Day Number and utc2 is the fraction of a day.
22902        *
22903        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22904        *     special measures are taken.  The convention in the present
22905        *     function is that the JD day represents UTC days whether the
22906        *     length is 86399, 86400 or 86401 SI seconds.
22907        *
22908        *  <li> The warning status "dubious year" flags UTCs that predate the
22909        *     introduction of the time scale and that are too far in the future
22910        *     to be trusted.  See jauDat  for further details.
22911        *
22912        *  <li> The function jauDtf2d  converts from calendar date and time of
22913        *     day into 2-part Julian Date, and in the case of UTC implements
22914        *     the leap-second-ambiguity convention described above.
22915        *
22916        *  <li> Delta UT1 can be obtained from tabulations provided by the
22917        *     International Earth Rotation and Reference Systems Service.  It
22918        *     It is the caller's responsibility to supply a DUT argument
22919        *     containing the UT1-UTC value that matches the given UTC.
22920        *
22921        *  <li> The returned ut11,ut12 are such that their sum is the UT1 Julian
22922        *     Date.
22923        *
22924        *  <li> The warning status "dubious year" flags UTCs that predate the
22925        *     introduction of the time scale and that are too far in the future
22926        *     to be trusted.  See jauDat for further details.
22927        *</ol>
22928        *<p>References:
22929        *
22930        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22931        *     IERS Technical Note No. 32, BKG (2004)
22932        *
22933        *     Explanatory Supplement to the Astronomical Almanac,
22934        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22935        *
22936        *  Called:<ul>
22937        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22938        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22939        *     <li>{@link #jauUtctai}    UTC to TAI
22940        *     <li>{@link #jauTaiut1}    TAI to UT1
22941        *</ul>
22942        *@version 2010 May 16
22943        *
22944        *@since SOFA release 2010-12-01
22945        *
22946        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22947      * @throws JSOFAInternalError 
22948      * @throws JSOFAIllegalParameter 
22949        */
22950       public static JulianDate jauUtcut1(double utc1, double utc2, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22951       {
22952 
22953     
22954           double dta;
22955           /* Look up TAI-UTC. */
22956           Calendar dt = jauJd2cal(utc1, utc2) ;
22957           double dat = jauDat ( dt.iy, dt.im, dt.id, 0.0 );
22958      
22959 
22960           /* Form UT1-TAI. */
22961           dta = dut1 - dat;
22962 
22963           /* UTC to TAI to UT1. */
22964           JulianDate tai = jauUtctai(utc1, utc2);
22965           return jauTaiut1(tai.djm0, tai.djm1, dta) ;
22966 
22967       };
22968 
22969       
22970     public static CelestialIntermediatePole jauXy06(double date1, double date2)
22971     /**
22972     *  X,Y coordinates of celestial intermediate pole from series based
22973     *  on IAU 2006 precession and IAU 2000A nutation.
22974     *
22975     *<p>This function is derived from the International Astronomical Union's
22976     *  SOFA (Standards Of Fundamental Astronomy) software collection.
22977     *
22978     *<p>Status:  canonical model.
22979     *
22980     *<!-- Given: -->
22981     *     @param date1 double TT as a 2-part Julian Date (Note 1)
22982     *     @param date2 double TT as a 2-part Julian Date (Note 1)
22983     *
22984     *<!-- Returned: -->
22985     *     @return  CIP X,Y coordinates (Note 2)
22986     *
22987     * <p>Notes:
22988     * <ol>
22989     *
22990     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
22991     *     convenient way between the two arguments.  For example,
22992     *     JD(TT)=2450123.7 could be expressed in any of these ways,
22993     *     among others:
22994     *<pre>
22995     *            date1          date2
22996     *
22997     *         2450123.7           0.0       (JD method)
22998     *         2451545.0       -1421.3       (J2000 method)
22999     *         2400000.5       50123.2       (MJD method)
23000     *         2450123.5           0.2       (date &amp; time method)
23001     *</pre>
23002     *     The JD method is the most natural and convenient to use in
23003     *     cases where the loss of several decimal digits of resolution
23004     *     is acceptable.  The J2000 method is best matched to the way
23005     *     the argument is handled internally and will deliver the
23006     *     optimum resolution.  The MJD method and the date &amp; time methods
23007     *     are both good compromises between resolution and convenience.
23008     *
23009     * <li> The X,Y coordinates are those of the unit vector towards the
23010     *     celestial intermediate pole.  They represent the combined effects
23011     *     of frame bias, precession and nutation.
23012     *
23013     * <li> The fundamental arguments used are as adopted in IERS Conventions
23014     *     (2003) and are from Simon et al. (1994) and Souchay et al.
23015     *     (1999).
23016     *
23017     * <li> This is an alternative to the angles-based method, via the JSOFA
23018     *     function jauFw2xy and as used in jauXys06a for example.  The two
23019     *     methods agree at the 1 microarcsecond level (at present), a
23020     *     negligible amount compared with the intrinsic accuracy of the
23021     *     models.  However, it would be unwise to mix the two methods
23022     *     (angles-based and series-based) in a single application.
23023     *</ol>
23024     *<p>Called:<ul>
23025     *     <li>{@link #jauFal03} mean anomaly of the Moon
23026     *     <li>{@link #jauFalp03} mean anomaly of the Sun
23027     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
23028     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
23029     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
23030     *     <li>{@link #jauFame03} mean longitude of Mercury
23031     *     <li>{@link #jauFave03} mean longitude of Venus
23032     *     <li>{@link #jauFae03} mean longitude of Earth
23033     *     <li>{@link #jauFama03} mean longitude of Mars
23034     *     <li>{@link #jauFaju03} mean longitude of Jupiter
23035     *     <li>{@link #jauFasa03} mean longitude of Saturn
23036     *     <li>{@link #jauFaur03} mean longitude of Uranus
23037     *     <li>{@link #jauFane03} mean longitude of Neptune
23038     *     <li>{@link #jauFapa03} general accumulated precession in longitude
23039     * </ul>
23040     *<p>References:
23041     *
23042     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2003,
23043     *     Astron.Astrophys., 412, 567
23044     *
23045     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
23046     *
23047     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
23048     *     IERS Technical Note No. 32, BKG
23049     *
23050     *     Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
23051     *     Francou, G. &amp; Laskar, J., Astron.Astrophys., 1994, 282, 663
23052     *
23053     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999,
23054     *     Astron.Astrophys.Supp.Ser. 135, 111
23055     *
23056     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
23057     *
23058     *@version 2009 October 16
23059     *
23060     *  @since Release 20101201
23061     *
23062     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
23063     */
23064     {
23065 
23066     /* Maximum power of T in the polynomials for X and Y */
23067        final int MAXPT = (5);
23068 
23069     /* Polynomial coefficients (arcsec, X then Y). */
23070        final double xyp[][] = {
23071 
23072           {    -0.016617,
23073              2004.191898,
23074                -0.4297829,
23075                -0.19861834,
23076                 0.000007578,
23077                 0.0000059285
23078           },
23079           {    -0.006951,
23080                -0.025896,
23081               -22.4072747,
23082                 0.00190059,
23083                 0.001112526,
23084                 0.0000001358
23085           }
23086        };
23087 
23088     /* N.B mfals defined as class static (outside this method) to avoid problems with 65535 byte limit for methods */ 
23089     /* Number of frequencies:  luni-solar */
23090         final int NFLS = mfals.length;
23091 
23092     /* Number of frequencies:  planetary */
23093        final int NFPL =mfapl.length ;
23094 
23095     /* Pointers into amplitudes array, one pointer per frequency */
23096        final int nc[] = {
23097 
23098        /* 1-100 */
23099            1,    21,    37,    51,    65,    79,    91,   103,   115,   127,
23100          139,   151,   163,   172,   184,   196,   207,   219,   231,   240,
23101          252,   261,   273,   285,   297,   309,   318,   327,   339,   351,
23102          363,   372,   384,   396,   405,   415,   423,   435,   444,   452,
23103          460,   467,   474,   482,   490,   498,   506,   513,   521,   528,
23104          536,   543,   551,   559,   566,   574,   582,   590,   597,   605,
23105          613,   620,   628,   636,   644,   651,   658,   666,   674,   680,
23106          687,   695,   702,   710,   717,   725,   732,   739,   746,   753,
23107          760,   767,   774,   782,   790,   798,   805,   812,   819,   826,
23108          833,   840,   846,   853,   860,   867,   874,   881,   888,   895,
23109 
23110        /* 101-200 */
23111          901,   908,   914,   921,   928,   934,   941,   948,   955,   962,
23112          969,   976,   982,   989,   996,  1003,  1010,  1017,  1024,  1031,
23113         1037,  1043,  1050,  1057,  1064,  1071,  1078,  1084,  1091,  1098,
23114         1104,  1112,  1118,  1124,  1131,  1138,  1145,  1151,  1157,  1164,
23115         1171,  1178,  1185,  1192,  1199,  1205,  1212,  1218,  1226,  1232,
23116         1239,  1245,  1252,  1259,  1266,  1272,  1278,  1284,  1292,  1298,
23117         1304,  1310,  1316,  1323,  1329,  1335,  1341,  1347,  1353,  1359,
23118         1365,  1371,  1377,  1383,  1389,  1396,  1402,  1408,  1414,  1420,
23119         1426,  1434,  1440,  1446,  1452,  1459,  1465,  1471,  1477,  1482,
23120         1488,  1493,  1499,  1504,  1509,  1514,  1520,  1527,  1532,  1538,
23121 
23122        /* 201-300 */
23123         1543,  1548,  1553,  1558,  1564,  1569,  1574,  1579,  1584,  1589,
23124         1594,  1596,  1598,  1600,  1602,  1605,  1608,  1610,  1612,  1617,
23125         1619,  1623,  1625,  1627,  1629,  1632,  1634,  1640,  1642,  1644,
23126         1646,  1648,  1650,  1652,  1654,  1658,  1660,  1662,  1664,  1668,
23127         1670,  1672,  1673,  1675,  1679,  1681,  1683,  1684,  1686,  1688,
23128         1690,  1693,  1695,  1697,  1701,  1703,  1705,  1707,  1709,  1711,
23129         1712,  1715,  1717,  1721,  1723,  1725,  1727,  1729,  1731,  1733,
23130         1735,  1737,  1739,  1741,  1743,  1745,  1747,  1749,  1751,  1753,
23131         1755,  1757,  1759,  1761,  1762,  1764,  1766,  1768,  1769,  1771,
23132         1773,  1775,  1777,  1779,  1781,  1783,  1785,  1787,  1788,  1790,
23133 
23134        /* 301-400 */
23135         1792,  1794,  1796,  1798,  1800,  1802,  1804,  1806,  1807,  1809,
23136         1811,  1815,  1817,  1819,  1821,  1823,  1825,  1827,  1829,  1831,
23137         1833,  1835,  1837,  1839,  1840,  1842,  1844,  1848,  1850,  1852,
23138         1854,  1856,  1858,  1859,  1860,  1862,  1864,  1866,  1868,  1869,
23139         1871,  1873,  1875,  1877,  1879,  1881,  1883,  1885,  1887,  1889,
23140         1891,  1892,  1896,  1898,  1900,  1901,  1903,  1905,  1907,  1909,
23141         1910,  1911,  1913,  1915,  1919,  1921,  1923,  1927,  1929,  1931,
23142         1933,  1935,  1937,  1939,  1943,  1945,  1947,  1948,  1949,  1951,
23143         1953,  1955,  1957,  1958,  1960,  1962,  1964,  1966,  1968,  1970,
23144         1971,  1973,  1974,  1975,  1977,  1979,  1980,  1981,  1982,  1984,
23145 
23146        /* 401-500 */
23147         1986,  1988,  1990,  1992,  1994,  1995,  1997,  1999,  2001,  2003,
23148         2005,  2007,  2008,  2009,  2011,  2013,  2015,  2017,  2019,  2021,
23149         2023,  2024,  2025,  2027,  2029,  2031,  2033,  2035,  2037,  2041,
23150         2043,  2045,  2046,  2047,  2049,  2051,  2053,  2055,  2056,  2057,
23151         2059,  2061,  2063,  2065,  2067,  2069,  2070,  2071,  2072,  2074,
23152         2076,  2078,  2080,  2082,  2084,  2086,  2088,  2090,  2092,  2094,
23153         2095,  2096,  2097,  2099,  2101,  2105,  2106,  2107,  2108,  2109,
23154         2110,  2111,  2113,  2115,  2119,  2121,  2123,  2125,  2127,  2129,
23155         2131,  2133,  2135,  2136,  2137,  2139,  2141,  2143,  2145,  2147,
23156         2149,  2151,  2153,  2155,  2157,  2159,  2161,  2163,  2165,  2167,
23157 
23158        /* 501-600 */
23159         2169,  2171,  2173,  2175,  2177,  2179,  2181,  2183,  2185,  2186,
23160         2187,  2188,  2192,  2193,  2195,  2197,  2199,  2201,  2203,  2205,
23161         2207,  2209,  2211,  2213,  2217,  2219,  2221,  2223,  2225,  2227,
23162         2229,  2231,  2233,  2234,  2235,  2236,  2237,  2238,  2239,  2240,
23163         2241,  2244,  2246,  2248,  2250,  2252,  2254,  2256,  2258,  2260,
23164         2262,  2264,  2266,  2268,  2270,  2272,  2274,  2276,  2278,  2280,
23165         2282,  2284,  2286,  2288,  2290,  2292,  2294,  2296,  2298,  2300,
23166         2302,  2303,  2304,  2305,  2306,  2307,  2309,  2311,  2313,  2315,
23167         2317,  2319,  2321,  2323,  2325,  2327,  2329,  2331,  2333,  2335,
23168         2337,  2341,  2343,  2345,  2347,  2349,  2351,  2352,  2355,  2356,
23169 
23170        /* 601-700 */
23171         2357,  2358,  2359,  2361,  2363,  2364,  2365,  2366,  2367,  2368,
23172         2369,  2370,  2371,  2372,  2373,  2374,  2376,  2378,  2380,  2382,
23173         2384,  2385,  2386,  2387,  2388,  2389,  2390,  2391,  2392,  2393,
23174         2394,  2395,  2396,  2397,  2398,  2399,  2400,  2401,  2402,  2403,
23175         2404,  2405,  2406,  2407,  2408,  2409,  2410,  2411,  2412,  2413,
23176         2414,  2415,  2417,  2418,  2430,  2438,  2445,  2453,  2460,  2468,
23177         2474,  2480,  2488,  2496,  2504,  2512,  2520,  2527,  2535,  2543,
23178         2550,  2558,  2566,  2574,  2580,  2588,  2596,  2604,  2612,  2619,
23179         2627,  2634,  2642,  2648,  2656,  2664,  2671,  2679,  2685,  2693,
23180         2701,  2709,  2717,  2725,  2733,  2739,  2747,  2753,  2761,  2769,
23181 
23182        /* 701-800 */
23183         2777,  2785,  2793,  2801,  2809,  2817,  2825,  2833,  2841,  2848,
23184         2856,  2864,  2872,  2878,  2884,  2892,  2898,  2906,  2914,  2922,
23185         2930,  2938,  2944,  2952,  2958,  2966,  2974,  2982,  2988,  2996,
23186         3001,  3009,  3017,  3025,  3032,  3039,  3045,  3052,  3059,  3067,
23187         3069,  3076,  3083,  3090,  3098,  3105,  3109,  3111,  3113,  3120,
23188         3124,  3128,  3132,  3136,  3140,  3144,  3146,  3150,  3158,  3161,
23189         3165,  3166,  3168,  3172,  3176,  3180,  3182,  3185,  3189,  3193,
23190         3194,  3197,  3200,  3204,  3208,  3212,  3216,  3219,  3221,  3222,
23191         3226,  3230,  3234,  3238,  3242,  3243,  3247,  3251,  3254,  3258,
23192         3262,  3266,  3270,  3274,  3275,  3279,  3283,  3287,  3289,  3293,
23193 
23194        /* 801-900 */
23195         3296,  3300,  3303,  3307,  3311,  3315,  3319,  3321,  3324,  3327,
23196         3330,  3334,  3338,  3340,  3342,  3346,  3350,  3354,  3358,  3361,
23197         3365,  3369,  3373,  3377,  3381,  3385,  3389,  3393,  3394,  3398,
23198         3402,  3406,  3410,  3413,  3417,  3421,  3425,  3429,  3433,  3435,
23199         3439,  3443,  3446,  3450,  3453,  3457,  3458,  3461,  3464,  3468,
23200         3472,  3476,  3478,  3481,  3485,  3489,  3493,  3497,  3501,  3505,
23201         3507,  3511,  3514,  3517,  3521,  3524,  3525,  3527,  3529,  3533,
23202         3536,  3540,  3541,  3545,  3548,  3551,  3555,  3559,  3563,  3567,
23203         3569,  3570,  3574,  3576,  3578,  3582,  3586,  3590,  3593,  3596,
23204         3600,  3604,  3608,  3612,  3616,  3620,  3623,  3626,  3630,  3632,
23205 
23206        /* 901-1000 */
23207         3636,  3640,  3643,  3646,  3648,  3652,  3656,  3660,  3664,  3667,
23208         3669,  3671,  3675,  3679,  3683,  3687,  3689,  3693,  3694,  3695,
23209         3699,  3703,  3705,  3707,  3710,  3713,  3717,  3721,  3725,  3729,
23210         3733,  3736,  3740,  3744,  3748,  3752,  3754,  3757,  3759,  3763,
23211         3767,  3770,  3773,  3777,  3779,  3783,  3786,  3790,  3794,  3798,
23212         3801,  3805,  3809,  3813,  3817,  3821,  3825,  3827,  3831,  3835,
23213         3836,  3837,  3840,  3844,  3848,  3852,  3856,  3859,  3863,  3867,
23214         3869,  3871,  3875,  3879,  3883,  3887,  3890,  3894,  3898,  3901,
23215         3905,  3909,  3913,  3917,  3921,  3922,  3923,  3924,  3926,  3930,
23216         3932,  3936,  3938,  3940,  3944,  3948,  3952,  3956,  3959,  3963,
23217 
23218        /* 1001-1100 */
23219         3965,  3969,  3973,  3977,  3979,  3981,  3982,  3986,  3989,  3993,
23220         3997,  4001,  4004,  4006,  4009,  4012,  4016,  4020,  4024,  4026,
23221         4028,  4032,  4036,  4040,  4044,  4046,  4050,  4054,  4058,  4060,
23222         4062,  4063,  4064,  4068,  4071,  4075,  4077,  4081,  4083,  4087,
23223         4089,  4091,  4095,  4099,  4101,  4103,  4105,  4107,  4111,  4115,
23224         4119,  4123,  4127,  4129,  4131,  4135,  4139,  4141,  4143,  4145,
23225         4149,  4153,  4157,  4161,  4165,  4169,  4173,  4177,  4180,  4183,
23226         4187,  4191,  4195,  4198,  4201,  4205,  4209,  4212,  4213,  4216,
23227         4217,  4221,  4223,  4226,  4230,  4234,  4236,  4240,  4244,  4248,
23228         4252,  4256,  4258,  4262,  4264,  4266,  4268,  4270,  4272,  4276,
23229 
23230        /* 1101-1200 */
23231         4279,  4283,  4285,  4287,  4289,  4293,  4295,  4299,  4300,  4301,
23232         4305,  4309,  4313,  4317,  4319,  4323,  4325,  4329,  4331,  4333,
23233         4335,  4337,  4341,  4345,  4349,  4351,  4353,  4357,  4361,  4365,
23234         4367,  4369,  4373,  4377,  4381,  4383,  4387,  4389,  4391,  4395,
23235         4399,  4403,  4407,  4411,  4413,  4414,  4415,  4418,  4419,  4421,
23236         4423,  4427,  4429,  4431,  4433,  4435,  4437,  4439,  4443,  4446,
23237         4450,  4452,  4456,  4458,  4460,  4462,  4466,  4469,  4473,  4477,
23238         4481,  4483,  4487,  4489,  4491,  4493,  4497,  4499,  4501,  4504,
23239         4506,  4510,  4513,  4514,  4515,  4518,  4521,  4522,  4525,  4526,
23240         4527,  4530,  4533,  4534,  4537,  4541,  4542,  4543,  4544,  4545,
23241 
23242        /* 1201-1300 */
23243         4546,  4547,  4550,  4553,  4554,  4555,  4558,  4561,  4564,  4567,
23244         4568,  4571,  4574,  4575,  4578,  4581,  4582,  4585,  4586,  4588,
23245         4590,  4592,  4596,  4598,  4602,  4604,  4608,  4612,  4613,  4616,
23246         4619,  4622,  4623,  4624,  4625,  4626,  4629,  4632,  4633,  4636,
23247         4639,  4640,  4641,  4642,  4643,  4644,  4645,  4648,  4649,  4650,
23248         4651,  4652,  4653,  4656,  4657,  4660,  4661,  4664,  4667,  4670,
23249         4671,  4674,  4675,  4676,  4677,  4678,  4681,  4682,  4683,  4684,
23250         4687,  4688,  4689,  4692,  4693,  4696,  4697,  4700,  4701,  4702,
23251         4703,  4704,  4707,  4708,  4711,  4712,  4715,  4716,  4717,  4718,
23252         4719,  4720,  4721,  4722,  4723,  4726,  4729,  4730,  4733,  4736,
23253 
23254        /* 1301-(NFLS+NFPL) */
23255         4737,  4740,  4741,  4742,  4745,  4746,  4749,  4752,  4753
23256        };
23257 
23258     /* Amplitude coefficients (microarcsec);  indexed using the nc array. */
23259        final double a[] = {
23260 
23261        /* 1-105 */
23262              -6844318.44,     9205236.26,1328.67,1538.18,      205833.11,
23263                153041.79,       -3309.73, 853.32,2037.98,       -2301.27,
23264            81.46, 120.56, -20.39, -15.22,   1.73,  -1.61,  -0.10,   0.11,
23265            -0.02,  -0.02,     -523908.04,      573033.42,-544.75,-458.66,
23266                 12814.01,       11714.49, 198.97,-290.91, 155.74,-143.27,
23267            -2.75,  -1.03,  -1.27,  -1.16,   0.00,  -0.01,      -90552.22,
23268                 97846.69, 111.23, 137.41,2187.91,2024.68,  41.44, -51.26,
23269            26.92, -24.46,  -0.46,  -0.28,  -0.22,  -0.20,       82168.76,
23270                -89618.24, -27.64, -29.05,       -2004.36,       -1837.32,
23271           -36.07,  48.00, -24.43,  22.41,   0.47,   0.24,   0.20,   0.18,
23272                 58707.02,7387.02, 470.05,-192.40, 164.33,       -1312.21,
23273          -179.73, -28.93, -17.36,  -1.83,  -0.50,   3.57,   0.00,   0.13,
23274                -20557.78,       22438.42, -20.84, -17.40, 501.82, 459.68,
23275            59.20, -67.30,   6.08,  -5.61,  -1.36,  -1.19,       28288.28,
23276          -674.99, -34.69,  35.80, -15.07,-632.54, -11.19,   0.78,  -8.41,
23277             0.17,   0.01,   0.07,      -15406.85,       20069.50,  15.12,
23278 
23279        /* 106-219 */
23280            31.80, 448.76, 344.50,  -5.77,   1.41,   4.59,  -5.02,   0.17,
23281             0.24,      -11991.74,       12902.66,  32.46,  36.70, 288.49,
23282           268.14,   5.70,  -7.06,   3.57,  -3.23,  -0.06,  -0.04,
23283                 -8584.95,       -9592.72,   4.42, -13.20,-214.50, 192.06,
23284            23.87,  29.83,   2.54,   2.40,   0.60,  -0.48,5095.50,
23285                 -6918.22,   7.19,   3.92,-154.91,-113.94,   2.86,  -1.04,
23286            -1.52,   1.73,  -0.07,  -0.10,       -4910.93,       -5331.13,
23287             0.76,   0.40,-119.21, 109.81,   2.16,   3.20,   1.46,   1.33,
23288             0.04,  -0.02,       -6245.02,-123.48,  -6.68,  -8.20,  -2.76,
23289           139.64,   2.71,   0.15,   1.86,2511.85,       -3323.89,   1.07,
23290            -0.90, -74.33, -56.17,   1.16,  -0.01,  -0.75,   0.83,  -0.02,
23291            -0.04,2307.58,3143.98,  -7.52,   7.50,  70.31, -51.60,   1.46,
23292             0.16,  -0.69,  -0.79,   0.02,  -0.05,2372.58,2554.51,   5.93,
23293            -6.60,  57.12, -53.05,  -0.96,  -1.24,  -0.71,  -0.64,  -0.01,
23294                 -2053.16,2636.13,   5.13,   7.80,  58.94,  45.91,  -0.42,
23295            -0.12,   0.61,  -0.66,   0.02,   0.03,       -1825.49,
23296 
23297        /* 220-339 */
23298                 -2423.59,   1.23,  -2.00, -54.19,  40.82,  -1.07,  -1.02,
23299             0.54,   0.61,  -0.04,   0.04,2521.07,-122.28,  -5.97,   2.90,
23300            -2.73, -56.37,  -0.82,   0.13,  -0.75,       -1534.09,1645.01,
23301             6.29,   6.80,  36.78,  34.30,   0.92,  -1.25,   0.46,  -0.41,
23302            -0.02,  -0.01,1898.27,  47.70,  -0.72,   2.50,   1.07, -42.45,
23303            -0.94,   0.02,  -0.56,       -1292.02,       -1387.00,   0.00,
23304             0.00, -31.01,  28.89,   0.68,   0.00,   0.38,   0.35,  -0.01,
23305            -0.01,       -1234.96,1323.81,   5.21,   5.90,  29.60,  27.61,
23306             0.74,  -1.22,   0.37,  -0.33,  -0.02,  -0.01,1137.48,
23307                 -1233.89,  -0.04,  -0.30, -27.59, -25.43,  -0.61,   1.00,
23308            -0.34,   0.31,   0.01,   0.01,-813.13,       -1075.60,   0.40,
23309             0.30, -24.05,  18.18,  -0.40,  -0.01,   0.24,   0.27,  -0.01,
23310             0.01,1163.22, -60.90,  -2.94,   1.30,  -1.36, -26.01,  -0.58,
23311             0.07,  -0.35,1029.70, -55.55,  -2.63,   1.10,  -1.25, -23.02,
23312            -0.52,   0.06,  -0.31,-556.26, 852.85,   3.16,  -4.48,  19.06,
23313            12.44,  -0.81,  -0.27,   0.17,  -0.21,   0.00,   0.02,-603.52,
23314 
23315        /* 340-467 */
23316          -800.34,   0.44,   0.10, -17.90,  13.49,  -0.08,  -0.01,   0.18,
23317             0.20,  -0.01,   0.01,-628.24, 684.99,  -0.64,  -0.50,  15.32,
23318            14.05,   3.18,  -4.19,   0.19,  -0.17,  -0.09,  -0.07,-866.48,
23319           -16.26,   0.52,  -1.30,  -0.36,  19.37,   0.43,  -0.01,   0.26,
23320          -512.37, 695.54,  -1.47,  -1.40,  15.55,  11.46,  -0.16,   0.03,
23321             0.15,  -0.17,   0.01,   0.01, 506.65, 643.75,   2.54,  -2.62,
23322            14.40, -11.33,  -0.77,  -0.06,  -0.15,  -0.16,   0.00,   0.01,
23323           664.57,  16.81,  -0.40,   1.00,   0.38, -14.86,  -3.71,  -0.09,
23324            -0.20, 405.91, 522.11,   0.99,  -1.50,  11.67,  -9.08,  -0.25,
23325            -0.02,  -0.12,  -0.13,-305.78, 326.60,   1.75,   1.90,   7.30,
23326             6.84,   0.20,  -0.04, 300.99,-325.03,  -0.44,  -0.50,  -7.27,
23327            -6.73,  -1.01,   0.01,   0.00,   0.08,   0.00,   0.02, 438.51,
23328            10.47,  -0.56,  -0.20,   0.24,  -9.81,  -0.24,   0.01,  -0.13,
23329          -264.02, 335.24,   0.99,   1.40,   7.49,   5.90,  -0.27,  -0.02,
23330           284.09, 307.03,   0.32,  -0.40,   6.87,  -6.35,  -0.99,  -0.01,
23331          -250.54, 327.11,   0.08,   0.40,   7.31,   5.60,  -0.30, 230.72,
23332 
23333        /* 468-595 */
23334          -304.46,   0.08,  -0.10,  -6.81,  -5.16,   0.27, 229.78, 304.17,
23335            -0.60,   0.50,   6.80,  -5.14,   0.33,   0.01, 256.30,-276.81,
23336            -0.28,  -0.40,  -6.19,  -5.73,  -0.14,   0.01,-212.82, 269.45,
23337             0.84,   1.20,   6.02,   4.76,   0.14,  -0.02, 196.64, 272.05,
23338            -0.84,   0.90,   6.08,  -4.40,   0.35,   0.02, 188.95, 272.22,
23339            -0.12,   0.30,   6.09,  -4.22,   0.34,-292.37,  -5.10,  -0.32,
23340            -0.40,  -0.11,   6.54,   0.14,   0.01, 161.79,-220.67,   0.24,
23341             0.10,  -4.93,  -3.62,  -0.08, 261.54, -19.94,  -0.95,   0.20,
23342            -0.45,  -5.85,  -0.13,   0.02, 142.16,-190.79,   0.20,   0.10,
23343            -4.27,  -3.18,  -0.07, 187.95,  -4.11,  -0.24,   0.30,  -0.09,
23344            -4.20,  -0.09,   0.01,   0.00,   0.00, -79.08, 167.90,   0.04,
23345             0.00,   3.75,   1.77, 121.98, 131.04,  -0.08,   0.10,   2.93,
23346            -2.73,  -0.06,-172.95,  -8.11,  -0.40,  -0.20,  -0.18,   3.87,
23347             0.09,   0.01,-160.15, -55.30, -14.04,  13.90,  -1.23,   3.58,
23348             0.40,   0.31,-115.40, 123.20,   0.60,   0.70,   2.75,   2.58,
23349             0.08,  -0.01,-168.26,  -2.00,   0.20,  -0.20,  -0.04,   3.76,
23350 
23351        /* 596-723 */
23352             0.08,-114.49, 123.20,   0.32,   0.40,   2.75,   2.56,   0.07,
23353            -0.01, 112.14, 120.70,   0.28,  -0.30,   2.70,  -2.51,  -0.07,
23354            -0.01, 161.34,   4.03,   0.20,   0.20,   0.09,  -3.61,  -0.08,
23355            91.31, 126.64,  -0.40,   0.40,   2.83,  -2.04,  -0.04,   0.01,
23356           105.29, 112.90,   0.44,  -0.50,   2.52,  -2.35,  -0.07,  -0.01,
23357            98.69,-106.20,  -0.28,  -0.30,  -2.37,  -2.21,  -0.06,   0.01,
23358            86.74,-112.94,  -0.08,  -0.20,  -2.53,  -1.94,  -0.05,-134.81,
23359             3.51,   0.20,  -0.20,   0.08,   3.01,   0.07,  79.03, 107.31,
23360            -0.24,   0.20,   2.40,  -1.77,  -0.04,   0.01, 132.81, -10.77,
23361            -0.52,   0.10,  -0.24,  -2.97,  -0.07,   0.01,-130.31,  -0.90,
23362             0.04,   0.00,   0.00,   2.91, -78.56,  85.32,   0.00,   0.00,
23363             1.91,   1.76,   0.04,   0.00,   0.00, -41.53,  89.10,   0.02,
23364             0.00,   1.99,   0.93,  66.03, -71.00,  -0.20,  -0.20,  -1.59,
23365            -1.48,  -0.04,  60.50,  64.70,   0.36,  -0.40,   1.45,  -1.35,
23366            -0.04,  -0.01, -52.27, -70.01,   0.00,   0.00,  -1.57,   1.17,
23367             0.03, -52.95,  66.29,   0.32,   0.40,   1.48,   1.18,   0.04,
23368 
23369        /* 724-851 */
23370            -0.01,  51.02,  67.25,   0.00,   0.00,   1.50,  -1.14,  -0.03,
23371           -55.66, -60.92,   0.16,  -0.20,  -1.36,   1.24,   0.03, -54.81,
23372           -59.20,  -0.08,   0.20,  -1.32,   1.23,   0.03,  51.32, -55.60,
23373             0.00,   0.00,  -1.24,  -1.15,  -0.03,  48.29,  51.80,   0.20,
23374            -0.20,   1.16,  -1.08,  -0.03, -45.59, -49.00,  -0.12,   0.10,
23375            -1.10,   1.02,   0.03,  40.54, -52.69,  -0.04,  -0.10,  -1.18,
23376            -0.91,  -0.02, -40.58, -49.51,  -1.00,   1.00,  -1.11,   0.91,
23377             0.04,   0.02, -43.76,  46.50,   0.36,   0.40,   1.04,   0.98,
23378             0.03,  -0.01,  62.65,  -5.00,  -0.24,   0.00,  -0.11,  -1.40,
23379            -0.03,   0.01, -38.57,  49.59,   0.08,   0.10,   1.11,   0.86,
23380             0.02, -33.22, -44.04,   0.08,  -0.10,  -0.98,   0.74,   0.02,
23381            37.15, -39.90,  -0.12,  -0.10,  -0.89,  -0.83,  -0.02,  36.68,
23382           -39.50,  -0.04,  -0.10,  -0.88,  -0.82,  -0.02, -53.22,  -3.91,
23383            -0.20,   0.00,  -0.09,   1.19,   0.03,  32.43, -42.19,  -0.04,
23384            -0.10,  -0.94,  -0.73,  -0.02, -51.00,  -2.30,  -0.12,  -0.10,
23385             0.00,   1.14, -29.53, -39.11,   0.04,   0.00,  -0.87,   0.66,
23386 
23387        /* 852-979 */
23388             0.02,  28.50, -38.92,  -0.08,  -0.10,  -0.87,  -0.64,  -0.02,
23389            26.54,  36.95,  -0.12,   0.10,   0.83,  -0.59,  -0.01,  26.54,
23390            34.59,   0.04,  -0.10,   0.77,  -0.59,  -0.02,  28.35, -32.55,
23391            -0.16,   0.20,  -0.73,  -0.63,  -0.01, -28.00,  30.40,   0.00,
23392             0.00,   0.68,   0.63,   0.01, -27.61,  29.40,   0.20,   0.20,
23393             0.66,   0.62,   0.02,  40.33,   0.40,  -0.04,   0.10,   0.00,
23394            -0.90, -23.28,  31.61,  -0.08,  -0.10,   0.71,   0.52,   0.01,
23395            37.75,   0.80,   0.04,   0.10,   0.00,  -0.84,  23.66,  25.80,
23396             0.00,   0.00,   0.58,  -0.53,  -0.01,  21.01, -27.91,   0.00,
23397             0.00,  -0.62,  -0.47,  -0.01, -34.81,   2.89,   0.04,   0.00,
23398             0.00,   0.78, -23.49, -25.31,   0.00,   0.00,  -0.57,   0.53,
23399             0.01, -23.47,  25.20,   0.16,   0.20,   0.56,   0.52,   0.02,
23400            19.58,  27.50,  -0.12,   0.10,   0.62,  -0.44,  -0.01, -22.67,
23401           -24.40,  -0.08,   0.10,  -0.55,   0.51,   0.01, -19.97,  25.00,
23402             0.12,   0.20,   0.56,   0.45,   0.01,  21.28, -22.80,  -0.08,
23403            -0.10,  -0.51,  -0.48,  -0.01, -30.47,   0.91,   0.04,   0.00,
23404 
23405        /* 980-1107 */
23406             0.00,   0.68,  18.58,  24.00,   0.04,  -0.10,   0.54,  -0.42,
23407            -0.01, -18.02,  24.40,  -0.04,  -0.10,   0.55,   0.40,   0.01,
23408            17.74,  22.50,   0.08,  -0.10,   0.50,  -0.40,  -0.01, -19.41,
23409            20.70,   0.08,   0.10,   0.46,   0.43,   0.01, -18.64,  20.11,
23410             0.00,   0.00,   0.45,   0.42,   0.01, -16.75,  21.60,   0.04,
23411             0.10,   0.48,   0.37,   0.01, -18.42, -20.00,   0.00,   0.00,
23412            -0.45,   0.41,   0.01, -26.77,   1.41,   0.08,   0.00,   0.00,
23413             0.60, -26.17,  -0.19,   0.00,   0.00,   0.00,   0.59, -15.52,
23414            20.51,   0.00,   0.00,   0.46,   0.35,   0.01, -25.42,  -1.91,
23415            -0.08,   0.00,  -0.04,   0.57,   0.45, -17.42,  18.10,   0.00,
23416             0.00,   0.40,   0.39,   0.01,  16.39, -17.60,  -0.08,  -0.10,
23417            -0.39,  -0.37,  -0.01, -14.37,  18.91,   0.00,   0.00,   0.42,
23418             0.32,   0.01,  23.39,  -2.40,  -0.12,   0.00,   0.00,  -0.52,
23419            14.32, -18.50,  -0.04,  -0.10,  -0.41,  -0.32,  -0.01,  15.69,
23420            17.08,   0.00,   0.00,   0.38,  -0.35,  -0.01, -22.99,   0.50,
23421             0.04,   0.00,   0.00,   0.51,   0.00,   0.00,  14.47, -17.60,
23422 
23423        /* 1108-1235 */
23424            -0.01,   0.00,  -0.39,  -0.32, -13.33,  18.40,  -0.04,  -0.10,
23425             0.41,   0.30,  22.47,  -0.60,  -0.04,   0.00,   0.00,  -0.50,
23426           -12.78, -17.41,   0.04,   0.00,  -0.39,   0.29,   0.01, -14.10,
23427           -15.31,   0.04,   0.00,  -0.34,   0.32,   0.01,  11.98,  16.21,
23428            -0.04,   0.00,   0.36,  -0.27,  -0.01,  19.65,  -1.90,  -0.08,
23429             0.00,   0.00,  -0.44,  19.61,  -1.50,  -0.08,   0.00,   0.00,
23430            -0.44,  13.41, -14.30,  -0.04,  -0.10,  -0.32,  -0.30,  -0.01,
23431           -13.29,  14.40,   0.00,   0.00,   0.32,   0.30,   0.01,  11.14,
23432           -14.40,  -0.04,   0.00,  -0.32,  -0.25,  -0.01,  12.24, -13.38,
23433             0.04,   0.00,  -0.30,  -0.27,  -0.01,  10.07, -13.81,   0.04,
23434             0.00,  -0.31,  -0.23,  -0.01,  10.46,  13.10,   0.08,  -0.10,
23435             0.29,  -0.23,  -0.01,  16.55,  -1.71,  -0.08,   0.00,   0.00,
23436            -0.37,   9.75, -12.80,   0.00,   0.00,  -0.29,  -0.22,  -0.01,
23437             9.11,  12.80,   0.00,   0.00,   0.29,  -0.20,   0.00,   0.00,
23438            -6.44, -13.80,   0.00,   0.00,  -0.31,   0.14,  -9.19, -12.00,
23439             0.00,   0.00,  -0.27,   0.21, -10.30,  10.90,   0.08,   0.10,
23440 
23441        /* 1236-1363 */
23442             0.24,   0.23,   0.01,  14.92,  -0.80,  -0.04,   0.00,   0.00,
23443            -0.33,  10.02, -10.80,   0.00,   0.00,  -0.24,  -0.22,  -0.01,
23444            -9.75,  10.40,   0.04,   0.00,   0.23,   0.22,   0.01,   9.67,
23445           -10.40,  -0.04,   0.00,  -0.23,  -0.22,  -0.01,  -8.28, -11.20,
23446             0.04,   0.00,  -0.25,   0.19,  13.32,  -1.41,  -0.08,   0.00,
23447             0.00,  -0.30,   8.27,  10.50,   0.04,   0.00,   0.23,  -0.19,
23448             0.00,   0.00,  13.13,   0.00,   0.00,   0.00,   0.00,  -0.29,
23449           -12.93,   0.70,   0.04,   0.00,   0.00,   0.29,   7.91, -10.20,
23450             0.00,   0.00,  -0.23,  -0.18,  -7.84, -10.00,  -0.04,   0.00,
23451            -0.22,   0.18,   7.44,   9.60,   0.00,   0.00,   0.21,  -0.17,
23452            -7.64,   9.40,   0.08,   0.10,   0.21,   0.17,   0.01, -11.38,
23453             0.60,   0.04,   0.00,   0.00,   0.25,  -7.48,   8.30,   0.00,
23454             0.00,   0.19,   0.17, -10.98,  -0.20,   0.00,   0.00,   0.00,
23455             0.25,  10.98,   0.20,   0.00,   0.00,   0.00,  -0.25,   7.40,
23456            -7.90,  -0.04,   0.00,  -0.18,  -0.17,  -6.09,   8.40,  -0.04,
23457             0.00,   0.19,   0.14,  -6.94,  -7.49,   0.00,   0.00,  -0.17,
23458 
23459        /* 1364-1491 */
23460             0.16,   6.92,   7.50,   0.04,   0.00,   0.17,  -0.15,   6.20,
23461             8.09,   0.00,   0.00,   0.18,  -0.14,  -6.12,   7.80,   0.04,
23462             0.00,   0.17,   0.14,   5.85,  -7.50,   0.00,   0.00,  -0.17,
23463            -0.13,  -6.48,   6.90,   0.08,   0.10,   0.15,   0.14,   0.01,
23464             6.32,   6.90,   0.00,   0.00,   0.15,  -0.14,   5.61,  -7.20,
23465             0.00,   0.00,  -0.16,  -0.13,   9.07,   0.00,   0.00,   0.00,
23466             0.00,  -0.20,   5.25,   6.90,   0.00,   0.00,   0.15,  -0.12,
23467            -8.47,  -0.40,   0.00,   0.00,   0.00,   0.19,   6.32,  -5.39,
23468            -1.11,   1.10,  -0.12,  -0.14,   0.02,   0.02,   5.73,  -6.10,
23469            -0.04,   0.00,  -0.14,  -0.13,   4.70,   6.60,  -0.04,   0.00,
23470             0.15,  -0.11,  -4.90,  -6.40,   0.00,   0.00,  -0.14,   0.11,
23471            -5.33,   5.60,   0.04,   0.10,   0.13,   0.12,   0.01,  -4.81,
23472             6.00,   0.04,   0.00,   0.13,   0.11,   5.13,   5.50,   0.04,
23473             0.00,   0.12,  -0.11,   4.50,   5.90,   0.00,   0.00,   0.13,
23474            -0.10,  -4.22,   6.10,   0.00,   0.00,   0.14,  -4.53,   5.70,
23475             0.00,   0.00,   0.13,   0.10,   4.18,   5.70,   0.00,   0.00,
23476 
23477        /* 1492-1619 */
23478             0.13,  -4.75,  -5.19,   0.00,   0.00,  -0.12,   0.11,  -4.06,
23479             5.60,   0.00,   0.00,   0.13,  -3.98,   5.60,  -0.04,   0.00,
23480             0.13,   4.02,  -5.40,   0.00,   0.00,  -0.12,   4.49,  -4.90,
23481            -0.04,   0.00,  -0.11,  -0.10,  -3.62,  -5.40,  -0.16,   0.20,
23482            -0.12,   0.00,   0.01,   4.38,   4.80,   0.00,   0.00,   0.11,
23483            -6.40,  -0.10,   0.00,   0.00,   0.00,   0.14,  -3.98,   5.00,
23484             0.04,   0.00,   0.11,  -3.82,  -5.00,   0.00,   0.00,  -0.11,
23485            -3.71,   5.07,   0.00,   0.00,   0.11,   4.14,   4.40,   0.00,
23486             0.00,   0.10,  -6.01,  -0.50,  -0.04,   0.00,   0.00,   0.13,
23487            -4.04,   4.39,   0.00,   0.00,   0.10,   3.45,  -4.72,   0.00,
23488             0.00,  -0.11,   3.31,   4.71,   0.00,   0.00,   0.11,   3.26,
23489            -4.50,   0.00,   0.00,  -0.10,  -3.26,  -4.50,   0.00,   0.00,
23490            -0.10,  -3.34,  -4.40,   0.00,   0.00,  -0.10,  -3.74,  -4.00,
23491             3.70,   4.00,   3.34,  -4.30,   3.30,  -4.30,  -3.66,   3.90,
23492             0.04,   3.66,   3.90,   0.04,  -3.62,  -3.90,  -3.61,   3.90,
23493            -0.20,   5.30,   0.00,   0.00,   0.12,   3.06,   4.30,   3.30,
23494 
23495        /* 1620-1747 */
23496             4.00,   0.40,   0.20,   3.10,   4.10,  -3.06,   3.90,  -3.30,
23497            -3.60,  -3.30,   3.36,   0.01,   3.14,   3.40,  -4.57,  -0.20,
23498             0.00,   0.00,   0.00,   0.10,  -2.70,  -3.60,   2.94,  -3.20,
23499            -2.90,   3.20,   2.47,  -3.40,   2.55,  -3.30,   2.80,  -3.08,
23500             2.51,   3.30,  -4.10,   0.30,  -0.12,  -0.10,   4.10,   0.20,
23501            -2.74,   3.00,   2.46,   3.23,  -3.66,   1.20,  -0.20,   0.20,
23502             3.74,  -0.40,  -2.51,  -2.80,  -3.74,   2.27,  -2.90,   0.00,
23503             0.00,  -2.50,   2.70,  -2.51,   2.60,  -3.50,   0.20,   3.38,
23504            -2.22,  -2.50,   3.26,  -0.40,   1.95,  -2.60,   3.22,  -0.40,
23505            -0.04,  -1.79,  -2.60,   1.91,   2.50,   0.74,   3.05,  -0.04,
23506             0.08,   2.11,  -2.30,  -2.11,   2.20,  -1.87,  -2.40,   2.03,
23507            -2.20,  -2.03,   2.20,   2.98,   0.00,   0.00,   2.98,  -1.71,
23508             2.40,   2.94,  -0.10,  -0.12,   0.10,   1.67,   2.40,  -1.79,
23509             2.30,  -1.79,   2.20,  -1.67,   2.20,   1.79,  -2.00,   1.87,
23510            -1.90,   1.63,  -2.10,  -1.59,   2.10,   1.55,  -2.10,  -1.55,
23511             2.10,  -2.59,  -0.20,  -1.75,  -1.90,  -1.75,   1.90,  -1.83,
23512 
23513        /* 1748-1875 */
23514            -1.80,   1.51,   2.00,  -1.51,  -2.00,   1.71,   1.80,   1.31,
23515             2.10,  -1.43,   2.00,   1.43,   2.00,  -2.43,  -1.51,   1.90,
23516            -1.47,   1.90,   2.39,   0.20,  -2.39,   1.39,   1.90,   1.39,
23517            -1.80,   1.47,  -1.60,   1.47,  -1.60,   1.43,  -1.50,  -1.31,
23518             1.60,   1.27,  -1.60,  -1.27,   1.60,   1.27,  -1.60,   2.03,
23519             1.35,   1.50,  -1.39,  -1.40,   1.95,  -0.20,  -1.27,   1.49,
23520             1.19,   1.50,   1.27,   1.40,   1.15,   1.50,   1.87,  -0.10,
23521            -1.12,  -1.50,   1.87,  -1.11,  -1.50,  -1.11,  -1.50,   0.00,
23522             0.00,   1.19,   1.40,   1.27,  -1.30,  -1.27,  -1.30,  -1.15,
23523             1.40,  -1.23,   1.30,  -1.23,  -1.30,   1.22,  -1.29,   1.07,
23524            -1.40,   1.75,  -0.20,  -1.03,  -1.40,  -1.07,   1.20,  -1.03,
23525             1.15,   1.07,   1.10,   1.51,  -1.03,   1.10,   1.03,  -1.10,
23526             0.00,   0.00,  -1.03,  -1.10,   0.91,  -1.20,  -0.88,  -1.20,
23527            -0.88,   1.20,  -0.95,   1.10,  -0.95,  -1.10,   1.43,  -1.39,
23528             0.95,  -1.00,  -0.95,   1.00,  -0.80,   1.10,   0.91,  -1.00,
23529            -1.35,   0.88,   1.00,  -0.83,   1.00,  -0.91,   0.90,   0.91,
23530 
23531        /* 1876-2003 */
23532             0.90,   0.88,  -0.90,  -0.76,  -1.00,  -0.76,   1.00,   0.76,
23533             1.00,  -0.72,   1.00,   0.84,  -0.90,   0.84,   0.90,   1.23,
23534             0.00,   0.00,  -0.52,  -1.10,  -0.68,   1.00,   1.19,  -0.20,
23535             1.19,   0.76,   0.90,   1.15,  -0.10,   1.15,  -0.10,   0.72,
23536            -0.90,  -1.15,  -1.15,   0.68,   0.90,  -0.68,   0.90,  -1.11,
23537             0.00,   0.00,   0.20,   0.79,   0.80,  -1.11,  -0.10,   0.00,
23538             0.00,  -0.48,  -1.00,  -0.76,  -0.80,  -0.72,  -0.80,  -1.07,
23539            -0.10,   0.64,   0.80,  -0.64,  -0.80,   0.64,   0.80,   0.40,
23540             0.60,   0.52,  -0.50,  -0.60,  -0.80,  -0.71,   0.70,  -0.99,
23541             0.99,   0.56,   0.80,  -0.56,   0.80,   0.68,  -0.70,   0.68,
23542             0.70,  -0.95,  -0.64,   0.70,   0.64,   0.70,  -0.60,   0.70,
23543            -0.60,  -0.70,  -0.91,  -0.10,  -0.51,   0.76,  -0.91,  -0.56,
23544             0.70,   0.88,   0.88,  -0.63,  -0.60,   0.55,  -0.60,  -0.80,
23545             0.80,  -0.80,  -0.52,   0.60,   0.52,   0.60,   0.52,  -0.60,
23546            -0.48,   0.60,   0.48,   0.60,   0.48,   0.60,  -0.76,   0.44,
23547            -0.60,   0.52,  -0.50,  -0.52,   0.50,   0.40,   0.60,  -0.40,
23548 
23549        /* 2004-2131 */
23550            -0.60,   0.40,  -0.60,   0.72,  -0.72,  -0.51,  -0.50,  -0.48,
23551             0.50,   0.48,  -0.50,  -0.48,   0.50,  -0.48,   0.50,   0.48,
23552            -0.50,  -0.48,  -0.50,  -0.68,  -0.68,   0.44,   0.50,  -0.64,
23553            -0.10,  -0.64,  -0.10,  -0.40,   0.50,   0.40,   0.50,   0.40,
23554             0.50,   0.00,   0.00,  -0.40,  -0.50,  -0.36,  -0.50,   0.36,
23555            -0.50,   0.60,  -0.60,   0.40,  -0.40,   0.40,   0.40,  -0.40,
23556             0.40,  -0.40,   0.40,  -0.56,  -0.56,   0.36,  -0.40,  -0.36,
23557             0.40,   0.36,  -0.40,  -0.36,  -0.40,   0.36,   0.40,   0.36,
23558             0.40,  -0.52,   0.52,   0.52,   0.32,   0.40,  -0.32,   0.40,
23559            -0.32,   0.40,  -0.32,   0.40,   0.32,  -0.40,  -0.32,  -0.40,
23560             0.32,  -0.40,   0.28,  -0.40,  -0.28,   0.40,   0.28,  -0.40,
23561             0.28,   0.40,   0.48,  -0.48,   0.48,   0.36,  -0.30,  -0.36,
23562            -0.30,   0.00,   0.00,   0.20,   0.40,  -0.44,   0.44,  -0.44,
23563            -0.44,  -0.44,  -0.44,   0.32,  -0.30,   0.32,   0.30,   0.24,
23564             0.30,  -0.12,  -0.10,  -0.28,   0.30,   0.28,   0.30,   0.28,
23565             0.30,   0.28,  -0.30,   0.28,  -0.30,   0.28,  -0.30,   0.28,
23566 
23567        /* 2132-2259 */
23568             0.30,  -0.28,   0.30,   0.40,   0.40,  -0.24,   0.30,   0.24,
23569            -0.30,   0.24,  -0.30,  -0.24,  -0.30,   0.24,   0.30,   0.24,
23570            -0.30,  -0.24,   0.30,   0.24,  -0.30,  -0.24,  -0.30,   0.24,
23571            -0.30,   0.24,   0.30,  -0.24,   0.30,  -0.24,   0.30,   0.20,
23572            -0.30,   0.20,  -0.30,   0.20,  -0.30,   0.20,   0.30,   0.20,
23573            -0.30,   0.20,  -0.30,   0.20,   0.30,   0.20,   0.30,  -0.20,
23574            -0.30,   0.20,  -0.30,   0.20,  -0.30,  -0.36,  -0.36,  -0.36,
23575            -0.04,   0.30,   0.12,  -0.10,  -0.32,  -0.24,   0.20,   0.24,
23576             0.20,   0.20,  -0.20,  -0.20,  -0.20,  -0.20,  -0.20,   0.20,
23577             0.20,   0.20,  -0.20,   0.20,   0.20,   0.20,   0.20,  -0.20,
23578            -0.20,   0.00,   0.00,  -0.20,  -0.20,  -0.20,   0.20,  -0.20,
23579             0.20,   0.20,  -0.20,  -0.20,  -0.20,   0.20,   0.20,   0.20,
23580             0.20,   0.20,  -0.20,   0.20,  -0.20,   0.28,   0.28,   0.28,
23581             0.28,   0.28,   0.28,  -0.28,   0.28,   0.12,   0.00,   0.24,
23582             0.16,  -0.20,   0.16,  -0.20,   0.16,  -0.20,   0.16,   0.20,
23583            -0.16,   0.20,   0.16,   0.20,  -0.16,   0.20,  -0.16,   0.20,
23584 
23585        /* 2260-2387 */
23586            -0.16,   0.20,   0.16,  -0.20,   0.16,   0.20,   0.16,  -0.20,
23587            -0.16,   0.20,  -0.16,  -0.20,  -0.16,   0.20,   0.16,   0.20,
23588             0.16,  -0.20,   0.16,  -0.20,   0.16,   0.20,   0.16,   0.20,
23589             0.16,   0.20,  -0.16,  -0.20,   0.16,   0.20,  -0.16,   0.20,
23590             0.16,   0.20,  -0.16,  -0.20,   0.16,  -0.20,   0.16,  -0.20,
23591            -0.16,  -0.20,   0.24,  -0.24,  -0.24,   0.24,   0.24,   0.12,
23592             0.20,   0.12,   0.20,  -0.12,  -0.20,   0.12,  -0.20,   0.12,
23593            -0.20,  -0.12,   0.20,  -0.12,   0.20,  -0.12,  -0.20,   0.12,
23594             0.20,   0.12,   0.20,   0.12,  -0.20,  -0.12,   0.20,   0.12,
23595            -0.20,  -0.12,   0.20,   0.12,   0.20,   0.00,   0.00,  -0.12,
23596             0.20,  -0.12,   0.20,   0.12,  -0.20,  -0.12,   0.20,   0.12,
23597             0.20,   0.00,  -0.21,  -0.20,   0.00,   0.00,   0.20,  -0.20,
23598            -0.20,  -0.20,   0.20,  -0.16,  -0.10,   0.00,   0.17,   0.16,
23599             0.16,   0.16,   0.16,  -0.16,   0.16,   0.16,  -0.16,   0.16,
23600            -0.16,   0.16,   0.12,   0.10,   0.12,  -0.10,  -0.12,   0.10,
23601            -0.12,   0.10,   0.12,  -0.10,  -0.12,   0.12,  -0.12,   0.12,
23602 
23603        /* 2388-2515 */
23604            -0.12,   0.12,  -0.12,  -0.12,  -0.12,  -0.12,  -0.12,  -0.12,
23605            -0.12,   0.12,   0.12,   0.12,   0.12,  -0.12,  -0.12,   0.12,
23606             0.12,   0.12,  -0.12,   0.12,  -0.12,  -0.12,  -0.12,   0.12,
23607            -0.12,  -0.12,   0.12,   0.00,   0.11,   0.11,-122.67, 164.70,
23608           203.78, 273.50,   3.58,   2.74,   6.18,  -4.56,   0.00,  -0.04,
23609             0.00,  -0.07,  57.44, -77.10,  95.82, 128.60,  -1.77,  -1.28,
23610             2.85,  -2.14,  82.14,  89.50,   0.00,   0.00,   2.00,  -1.84,
23611            -0.04,  47.73, -64.10,  23.79,  31.90,  -1.45,  -1.07,   0.69,
23612            -0.53, -46.38,  50.50,   0.00,   0.00,   1.13,   1.04,   0.02,
23613           -18.38,   0.00,  63.80,   0.00,   0.00,   0.41,   0.00,  -1.43,
23614            59.07,   0.00,   0.00,   0.00,   0.00,  -1.32,  57.28,   0.00,
23615             0.00,   0.00,   0.00,  -1.28, -48.65,   0.00,  -1.15,   0.00,
23616             0.00,   1.09,   0.00,   0.03, -18.30,  24.60, -17.30, -23.20,
23617             0.56,   0.41,  -0.51,   0.39, -16.91,  26.90,   8.43,  13.30,
23618             0.60,   0.38,   0.31,  -0.19,   1.23,  -1.70, -19.13, -25.70,
23619            -0.03,  -0.03,  -0.58,   0.43,  -0.72,   0.90, -17.34, -23.30,
23620 
23621        /* 2516-2643 */
23622             0.03,   0.02,  -0.52,   0.39, -19.49, -21.30,   0.00,   0.00,
23623            -0.48,   0.44,   0.01,  20.57, -20.10,   0.64,   0.70,  -0.45,
23624            -0.46,   0.00,  -0.01,   4.89,   5.90, -16.55,  19.90,   0.14,
23625            -0.11,   0.44,   0.37,  18.22,  19.80,   0.00,   0.00,   0.44,
23626            -0.41,  -0.01,   4.89,  -5.30, -16.51, -18.00,  -0.11,  -0.11,
23627            -0.41,   0.37, -17.86,   0.00,  17.10,   0.00,   0.00,   0.40,
23628             0.00,  -0.38,   0.32,   0.00,  24.42,   0.00,   0.00,  -0.01,
23629             0.00,  -0.55, -23.79,   0.00,   0.00,   0.00,   0.00,   0.53,
23630            14.72, -16.00,  -0.32,   0.00,  -0.36,  -0.33,  -0.01,   0.01,
23631             3.34,  -4.50,  11.86,  15.90,  -0.11,  -0.07,   0.35,  -0.27,
23632            -3.26,   4.40,  11.62,  15.60,   0.09,   0.07,   0.35,  -0.26,
23633           -19.53,   0.00,   5.09,   0.00,   0.00,   0.44,   0.00,  -0.11,
23634           -13.48,  14.70,   0.00,   0.00,   0.33,   0.30,   0.01,  10.86,
23635           -14.60,   3.18,   4.30,  -0.33,  -0.24,   0.09,  -0.07, -11.30,
23636           -15.10,   0.00,   0.00,  -0.34,   0.25,   0.01,   2.03,  -2.70,
23637            10.82,  14.50,  -0.07,  -0.05,   0.32,  -0.24,  17.46,   0.00,
23638 
23639        /* 2644-2771 */
23640             0.00,   0.00,   0.00,  -0.39,  16.43,   0.00,   0.52,   0.00,
23641             0.00,  -0.37,   0.00,  -0.01,   9.35,   0.00,  13.29,   0.00,
23642             0.00,  -0.21,   0.00,  -0.30, -10.42,  11.40,   0.00,   0.00,
23643             0.25,   0.23,   0.01,   0.44,   0.50, -10.38,  11.30,   0.02,
23644            -0.01,   0.25,   0.23, -14.64,   0.00,   0.00,   0.00,   0.00,
23645             0.33,   0.56,   0.80,  -8.67,  11.70,   0.02,  -0.01,   0.26,
23646             0.19,  13.88,   0.00,  -2.47,   0.00,   0.00,  -0.31,   0.00,
23647             0.06,  -1.99,   2.70,   7.72,  10.30,   0.06,   0.04,   0.23,
23648            -0.17,  -0.20,   0.00,  13.05,   0.00,   0.00,   0.00,   0.00,
23649            -0.29,   6.92,  -9.30,   3.34,   4.50,  -0.21,  -0.15,   0.10,
23650            -0.07,  -6.60,   0.00,  10.70,   0.00,   0.00,   0.15,   0.00,
23651            -0.24,  -8.04,  -8.70,   0.00,   0.00,  -0.19,   0.18, -10.58,
23652             0.00,  -3.10,   0.00,   0.00,   0.24,   0.00,   0.07,  -7.32,
23653             8.00,  -0.12,  -0.10,   0.18,   0.16,   1.63,   1.70,   6.96,
23654            -7.60,   0.03,  -0.04,  -0.17,  -0.16,  -3.62,   0.00,   9.86,
23655             0.00,   0.00,   0.08,   0.00,  -0.22,   0.20,  -0.20,  -6.88,
23656 
23657        /* 2772-2899 */
23658            -7.50,   0.00,   0.00,  -0.17,   0.15,  -8.99,   0.00,   4.02,
23659             0.00,   0.00,   0.20,   0.00,  -0.09,  -1.07,   1.40,  -5.69,
23660            -7.70,   0.03,   0.02,  -0.17,   0.13,   6.48,  -7.20,  -0.48,
23661            -0.50,  -0.16,  -0.14,  -0.01,   0.01,   5.57,  -7.50,   1.07,
23662             1.40,  -0.17,  -0.12,   0.03,  -0.02,   8.71,   0.00,   3.54,
23663             0.00,   0.00,  -0.19,   0.00,  -0.08,   0.40,   0.00,   9.27,
23664             0.00,   0.00,  -0.01,   0.00,  -0.21,  -6.13,   6.70,  -1.19,
23665            -1.30,   0.15,   0.14,  -0.03,   0.03,   5.21,  -5.70,  -2.51,
23666            -2.60,  -0.13,  -0.12,  -0.06,   0.06,   5.69,  -6.20,  -0.12,
23667            -0.10,  -0.14,  -0.13,  -0.01,   2.03,  -2.70,   4.53,   6.10,
23668            -0.06,  -0.05,   0.14,  -0.10,   5.01,   5.50,  -2.51,   2.70,
23669             0.12,  -0.11,   0.06,   0.06,  -1.91,   2.60,  -4.38,  -5.90,
23670             0.06,   0.04,  -0.13,   0.10,   4.65,  -6.30,   0.00,   0.00,
23671            -0.14,  -0.10,  -5.29,   5.70,   0.00,   0.00,   0.13,   0.12,
23672            -2.23,  -4.00,  -4.65,   4.20,  -0.09,   0.05,   0.10,   0.10,
23673            -4.53,   6.10,   0.00,   0.00,   0.14,   0.10,   2.47,   2.70,
23674 
23675        /* 2900-3027 */
23676            -4.46,   4.90,   0.06,  -0.06,   0.11,   0.10,  -5.05,   5.50,
23677             0.84,   0.90,   0.12,   0.11,   0.02,  -0.02,   4.97,  -5.40,
23678            -1.71,   0.00,  -0.12,  -0.11,   0.00,   0.04,  -0.99,  -1.30,
23679             4.22,  -5.70,  -0.03,   0.02,  -0.13,  -0.09,   0.99,   1.40,
23680             4.22,  -5.60,   0.03,  -0.02,  -0.13,  -0.09,  -4.69,  -5.20,
23681             0.00,   0.00,  -0.12,   0.10,  -3.42,   0.00,   6.09,   0.00,
23682             0.00,   0.08,   0.00,  -0.14,  -4.65,  -5.10,   0.00,   0.00,
23683            -0.11,   0.10,   0.00,   0.00,  -4.53,  -5.00,   0.00,   0.00,
23684            -0.11,   0.10,  -2.43,  -2.70,  -3.82,   4.20,  -0.06,   0.05,
23685             0.10,   0.09,   0.00,   0.00,  -4.53,   4.90,   0.00,   0.00,
23686             0.11,   0.10,  -4.49,  -4.90,   0.00,   0.00,  -0.11,   0.10,
23687             2.67,  -2.90,  -3.62,  -3.90,  -0.06,  -0.06,  -0.09,   0.08,
23688             3.94,  -5.30,   0.00,   0.00,  -0.12,  -3.38,   3.70,  -2.78,
23689            -3.10,   0.08,   0.08,  -0.07,   0.06,   3.18,  -3.50,  -2.82,
23690            -3.10,  -0.08,  -0.07,  -0.07,   0.06,  -5.77,   0.00,   1.87,
23691             0.00,   0.00,   0.13,   0.00,  -0.04,   3.54,  -4.80,  -0.64,
23692 
23693        /* 3028-3155 */
23694            -0.90,  -0.11,   0.00,  -0.02,  -3.50,  -4.70,   0.68,  -0.90,
23695            -0.11,   0.00,  -0.02,   5.49,   0.00,   0.00,   0.00,   0.00,
23696            -0.12,   1.83,  -2.50,   2.63,   3.50,  -0.06,   0.00,   0.08,
23697             3.02,  -4.10,   0.68,   0.90,  -0.09,   0.00,   0.02,   0.00,
23698             0.00,   5.21,   0.00,   0.00,   0.00,   0.00,  -0.12,  -3.54,
23699             3.80,   2.70,   3.60,  -1.35,   1.80,   0.08,   0.00,   0.04,
23700            -2.90,   3.90,   0.68,   0.90,   0.09,   0.00,   0.02,   0.80,
23701            -1.10,  -2.78,  -3.70,  -0.02,   0.00,  -0.08,   4.10,   0.00,
23702            -2.39,   0.00,   0.00,  -0.09,   0.00,   0.05,  -1.59,   2.10,
23703             2.27,   3.00,   0.05,   0.00,   0.07,  -2.63,   3.50,  -0.48,
23704            -0.60,  -2.94,  -3.20,  -2.94,   3.20,   2.27,  -3.00,  -1.11,
23705            -1.50,  -0.07,   0.00,  -0.03,  -0.56,  -0.80,  -2.35,   3.10,
23706             0.00,  -0.60,  -3.42,   1.90,  -0.12,  -0.10,   2.63,  -2.90,
23707             2.51,   2.80,  -0.64,   0.70,  -0.48,  -0.60,   2.19,  -2.90,
23708             0.24,  -0.30,   2.15,   2.90,   2.15,  -2.90,   0.52,   0.70,
23709             2.07,  -2.80,  -3.10,   0.00,   1.79,   0.00,   0.00,   0.07,
23710 
23711        /* 3156-3283 */
23712             0.00,  -0.04,   0.88,   0.00,  -3.46,   2.11,   2.80,  -0.36,
23713             0.50,   3.54,  -0.20,  -3.50,  -1.39,   1.50,  -1.91,  -2.10,
23714            -1.47,   2.00,   1.39,   1.90,   2.07,  -2.30,   0.91,   1.00,
23715             1.99,  -2.70,   3.30,   0.00,   0.60,  -0.44,  -0.70,  -1.95,
23716             2.60,   2.15,  -2.40,  -0.60,  -0.70,   3.30,   0.84,   0.00,
23717            -3.10,  -3.10,   0.00,  -0.72,  -0.32,   0.40,  -1.87,  -2.50,
23718             1.87,  -2.50,   0.32,   0.40,  -0.24,   0.30,  -1.87,  -2.50,
23719            -0.24,  -0.30,   1.87,  -2.50,  -2.70,   0.00,   1.55,   2.03,
23720             2.20,  -2.98,  -1.99,  -2.20,   0.12,  -0.10,  -0.40,   0.50,
23721             1.59,   2.10,   0.00,   0.00,  -1.79,   2.00,  -1.03,   1.40,
23722            -1.15,  -1.60,   0.32,   0.50,   1.39,  -1.90,   2.35,  -1.27,
23723             1.70,   0.60,   0.80,  -0.32,  -0.40,   1.35,  -1.80,   0.44,
23724             0.00,   2.23,  -0.84,   0.90,  -1.27,  -1.40,  -1.47,   1.60,
23725            -0.28,  -0.30,  -0.28,   0.40,  -1.27,  -1.70,   0.28,  -0.40,
23726            -1.43,  -1.50,   0.00,   0.00,  -1.27,  -1.70,   2.11,  -0.32,
23727            -0.40,  -1.23,   1.60,   1.19,  -1.30,  -0.72,  -0.80,   0.72,
23728 
23729        /* 3284-3411 */
23730            -0.80,  -1.15,  -1.30,  -1.35,  -1.50,  -1.19,  -1.60,  -0.12,
23731             0.20,   1.79,   0.00,  -0.88,  -0.28,   0.40,   1.11,   1.50,
23732            -1.83,   0.00,   0.56,  -0.12,   0.10,  -1.27,  -1.40,   0.00,
23733             0.00,   1.15,   1.50,  -0.12,   0.20,   1.11,   1.50,   0.36,
23734            -0.50,  -1.07,  -1.40,  -1.11,   1.50,   1.67,   0.00,   0.80,
23735            -1.11,   0.00,   1.43,   1.23,  -1.30,  -0.24,  -1.19,  -1.30,
23736            -0.24,   0.20,  -0.44,  -0.90,  -0.95,   1.10,   1.07,  -1.40,
23737             1.15,  -1.30,   1.03,  -1.10,  -0.56,  -0.60,  -0.68,   0.90,
23738            -0.76,  -1.00,  -0.24,  -0.30,   0.95,  -1.30,   0.56,   0.70,
23739             0.84,  -1.10,  -0.56,   0.00,  -1.55,   0.91,  -1.30,   0.28,
23740             0.30,   0.16,  -0.20,   0.95,   1.30,   0.40,  -0.50,  -0.88,
23741            -1.20,   0.95,  -1.10,  -0.48,  -0.50,   0.00,   0.00,  -1.07,
23742             1.20,   0.44,  -0.50,   0.95,   1.10,   0.00,   0.00,   0.92,
23743            -1.30,   0.95,   1.00,  -0.52,   0.60,   1.59,   0.24,  -0.40,
23744             0.91,   1.20,   0.84,  -1.10,  -0.44,  -0.60,   0.84,   1.10,
23745            -0.44,   0.60,  -0.44,   0.60,  -0.84,  -1.10,  -0.80,   0.00,
23746 
23747        /* 3412-3539 */
23748             1.35,   0.76,   0.20,  -0.91,  -1.00,   0.20,  -0.30,  -0.91,
23749            -1.20,  -0.95,   1.00,  -0.48,  -0.50,   0.88,   1.00,   0.48,
23750            -0.50,  -0.95,  -1.10,   0.20,  -0.20,  -0.99,   1.10,  -0.84,
23751             1.10,  -0.24,  -0.30,   0.20,  -0.30,   0.84,   1.10,  -1.39,
23752             0.00,  -0.28,  -0.16,   0.20,   0.84,   1.10,   0.00,   0.00,
23753             1.39,   0.00,   0.00,  -0.95,   1.00,   1.35,  -0.99,   0.00,
23754             0.88,  -0.52,   0.00,  -1.19,   0.20,   0.20,   0.76,  -1.00,
23755             0.00,   0.00,   0.76,   1.00,   0.00,   0.00,   0.76,   1.00,
23756            -0.76,   1.00,   0.00,   0.00,   1.23,   0.76,   0.80,  -0.32,
23757             0.40,  -0.72,   0.80,  -0.40,  -0.40,   0.00,   0.00,  -0.80,
23758            -0.90,  -0.68,   0.90,  -0.16,  -0.20,  -0.16,  -0.20,   0.68,
23759            -0.90,  -0.36,   0.50,  -0.56,  -0.80,   0.72,  -0.90,   0.44,
23760            -0.60,  -0.48,  -0.70,  -0.16,   0.00,  -1.11,   0.32,   0.00,
23761            -1.07,   0.60,  -0.80,  -0.28,  -0.40,  -0.64,   0.00,   0.91,
23762             1.11,   0.64,  -0.90,   0.76,  -0.80,   0.00,   0.00,  -0.76,
23763            -0.80,   1.03,   0.00,  -0.36,  -0.64,  -0.70,   0.36,  -0.40,
23764 
23765        /* 3540-3667 */
23766             1.07,   0.36,  -0.50,  -0.52,  -0.70,   0.60,   0.00,   0.88,
23767             0.95,   0.00,   0.48,   0.16,  -0.20,   0.60,   0.80,   0.16,
23768            -0.20,  -0.60,  -0.80,   0.00,  -1.00,   0.12,   0.20,   0.16,
23769            -0.20,   0.68,   0.70,   0.59,  -0.80,  -0.99,  -0.56,  -0.60,
23770             0.36,  -0.40,  -0.68,  -0.70,  -0.68,  -0.70,  -0.36,  -0.50,
23771            -0.44,   0.60,   0.64,   0.70,  -0.12,   0.10,  -0.52,   0.60,
23772             0.36,   0.40,   0.00,   0.00,   0.95,  -0.84,   0.00,   0.44,
23773             0.56,   0.60,   0.32,  -0.30,   0.00,   0.00,   0.60,   0.70,
23774             0.00,   0.00,   0.60,   0.70,  -0.12,  -0.20,   0.52,  -0.70,
23775             0.00,   0.00,   0.56,   0.70,  -0.12,   0.10,  -0.52,  -0.70,
23776             0.00,   0.00,   0.88,  -0.76,   0.00,  -0.44,   0.00,   0.00,
23777            -0.52,  -0.70,   0.52,  -0.70,   0.36,  -0.40,  -0.44,  -0.50,
23778             0.00,   0.00,   0.60,   0.60,   0.84,   0.00,   0.12,  -0.24,
23779             0.00,   0.80,  -0.56,   0.60,  -0.32,  -0.30,   0.48,  -0.50,
23780             0.28,  -0.30,  -0.48,  -0.50,   0.12,   0.20,   0.48,  -0.60,
23781             0.48,   0.60,  -0.12,   0.20,   0.24,   0.00,   0.76,  -0.52,
23782 
23783        /* 3668-3795 */
23784            -0.60,  -0.52,   0.60,   0.48,  -0.50,  -0.24,  -0.30,   0.12,
23785            -0.10,   0.48,   0.60,   0.52,  -0.20,   0.36,   0.40,  -0.44,
23786             0.50,  -0.24,  -0.30,  -0.48,  -0.60,  -0.44,  -0.60,  -0.12,
23787             0.10,   0.76,   0.76,   0.20,  -0.20,   0.48,   0.50,   0.40,
23788            -0.50,  -0.24,  -0.30,   0.44,  -0.60,   0.44,  -0.60,   0.36,
23789             0.00,  -0.64,   0.72,   0.00,  -0.12,   0.00,  -0.10,  -0.40,
23790            -0.60,  -0.20,  -0.20,  -0.44,   0.50,  -0.44,   0.50,   0.20,
23791             0.20,  -0.44,  -0.50,   0.20,  -0.20,  -0.20,   0.20,  -0.44,
23792            -0.50,   0.64,   0.00,   0.32,  -0.36,   0.50,  -0.20,  -0.30,
23793             0.12,  -0.10,   0.48,   0.50,  -0.12,   0.30,  -0.36,  -0.50,
23794             0.00,   0.00,   0.48,   0.50,  -0.48,   0.50,   0.68,   0.00,
23795            -0.12,   0.56,  -0.40,   0.44,  -0.50,  -0.12,  -0.10,   0.24,
23796             0.30,  -0.40,   0.40,   0.64,   0.00,  -0.24,   0.64,   0.00,
23797            -0.20,   0.00,   0.00,   0.44,  -0.50,   0.44,   0.50,  -0.12,
23798             0.20,  -0.36,  -0.50,   0.12,   0.00,   0.64,  -0.40,   0.50,
23799             0.00,   0.10,   0.00,   0.00,  -0.40,   0.50,   0.00,   0.00,
23800 
23801        /* 3796-3923 */
23802            -0.40,  -0.50,   0.56,   0.00,   0.28,   0.00,   0.10,   0.36,
23803             0.50,   0.00,  -0.10,   0.36,  -0.50,   0.36,   0.50,   0.00,
23804            -0.10,   0.24,  -0.20,  -0.36,  -0.40,   0.16,   0.20,   0.40,
23805            -0.40,   0.00,   0.00,  -0.36,  -0.50,  -0.36,  -0.50,  -0.32,
23806            -0.50,  -0.12,   0.10,   0.20,   0.20,  -0.36,   0.40,  -0.60,
23807             0.60,   0.28,   0.00,   0.52,   0.12,  -0.10,   0.40,   0.40,
23808             0.00,  -0.50,   0.20,  -0.20,  -0.32,   0.40,   0.16,   0.20,
23809            -0.16,   0.20,   0.32,   0.40,   0.56,   0.00,  -0.12,   0.32,
23810            -0.40,  -0.16,  -0.20,   0.00,   0.00,   0.40,   0.40,  -0.40,
23811            -0.40,  -0.40,   0.40,  -0.36,   0.40,   0.12,   0.10,   0.00,
23812             0.10,   0.36,   0.40,   0.00,  -0.10,   0.36,   0.40,  -0.36,
23813             0.40,   0.00,   0.10,   0.32,   0.00,   0.44,   0.12,   0.20,
23814             0.28,  -0.40,   0.00,   0.00,   0.36,   0.40,   0.32,  -0.40,
23815            -0.16,   0.12,   0.10,   0.32,  -0.40,   0.20,   0.30,  -0.24,
23816             0.30,   0.00,   0.10,   0.32,   0.40,   0.00,  -0.10,  -0.32,
23817            -0.40,  -0.32,   0.40,   0.00,   0.10,  -0.52,  -0.52,   0.52,
23818 
23819        /* 3924-4051 */
23820             0.32,  -0.40,   0.00,   0.00,   0.32,   0.40,   0.32,  -0.40,
23821             0.00,   0.00,  -0.32,  -0.40,  -0.32,   0.40,   0.32,   0.40,
23822             0.00,   0.00,   0.32,   0.40,   0.00,   0.00,  -0.32,  -0.40,
23823             0.00,   0.00,   0.32,   0.40,   0.16,   0.20,   0.32,  -0.30,
23824            -0.16,   0.00,  -0.48,  -0.20,   0.20,  -0.28,  -0.30,   0.28,
23825            -0.40,   0.00,   0.00,   0.28,  -0.40,   0.00,   0.00,   0.28,
23826            -0.40,   0.00,   0.00,  -0.28,  -0.40,   0.28,   0.40,  -0.28,
23827            -0.40,  -0.48,  -0.20,   0.20,   0.24,   0.30,   0.44,   0.00,
23828             0.16,   0.24,   0.30,   0.16,  -0.20,   0.24,   0.30,  -0.12,
23829             0.20,   0.20,   0.30,  -0.16,   0.20,   0.00,   0.00,   0.44,
23830            -0.32,   0.30,   0.24,   0.00,  -0.36,   0.36,   0.00,   0.24,
23831             0.12,  -0.20,   0.20,   0.30,  -0.12,   0.00,  -0.28,   0.30,
23832            -0.24,   0.30,   0.12,   0.10,  -0.28,  -0.30,  -0.28,   0.30,
23833             0.00,   0.00,  -0.28,  -0.30,   0.00,   0.00,  -0.28,  -0.30,
23834             0.00,   0.00,   0.28,   0.30,   0.00,   0.00,  -0.28,  -0.30,
23835            -0.28,   0.30,   0.00,   0.00,  -0.28,  -0.30,   0.00,   0.00,
23836 
23837        /* 4052-4179 */
23838             0.28,   0.30,   0.00,   0.00,  -0.28,   0.30,   0.28,  -0.30,
23839            -0.28,   0.30,   0.40,   0.40,  -0.24,   0.30,   0.00,  -0.10,
23840             0.16,   0.00,   0.36,  -0.20,   0.30,  -0.12,  -0.10,  -0.24,
23841            -0.30,   0.00,   0.00,  -0.24,   0.30,  -0.24,   0.30,   0.00,
23842             0.00,  -0.24,   0.30,  -0.24,   0.30,   0.24,  -0.30,   0.00,
23843             0.00,   0.24,  -0.30,   0.00,   0.00,   0.24,   0.30,   0.24,
23844            -0.30,   0.24,   0.30,  -0.24,   0.30,  -0.24,   0.30,  -0.20,
23845             0.20,  -0.16,  -0.20,   0.00,   0.00,  -0.32,   0.20,   0.00,
23846             0.10,   0.20,  -0.30,   0.20,  -0.20,   0.12,   0.20,  -0.16,
23847             0.20,   0.16,   0.20,   0.20,   0.30,   0.20,   0.30,   0.00,
23848             0.00,  -0.20,   0.30,   0.00,   0.00,   0.20,   0.30,  -0.20,
23849            -0.30,  -0.20,  -0.30,   0.20,  -0.30,   0.00,   0.00,   0.20,
23850             0.30,   0.00,   0.00,   0.20,   0.30,   0.00,   0.00,   0.20,
23851             0.30,   0.00,   0.00,   0.20,   0.30,   0.00,   0.00,   0.20,
23852            -0.30,   0.00,   0.00,  -0.20,  -0.30,   0.00,   0.00,  -0.20,
23853             0.30,   0.00,   0.00,  -0.20,   0.30,   0.00,   0.00,   0.36,
23854 
23855        /* 4180-4307 */
23856             0.00,   0.00,   0.36,   0.12,   0.10,  -0.24,   0.20,   0.12,
23857            -0.20,  -0.16,  -0.20,  -0.13,   0.10,   0.22,   0.21,   0.20,
23858             0.00,  -0.28,   0.32,   0.00,  -0.12,  -0.20,  -0.20,   0.12,
23859            -0.10,   0.12,   0.10,  -0.20,   0.20,   0.00,   0.00,  -0.32,
23860             0.32,   0.00,   0.00,   0.32,   0.32,   0.00,   0.00,  -0.24,
23861            -0.20,   0.24,   0.20,   0.20,   0.00,  -0.24,   0.00,   0.00,
23862            -0.24,  -0.20,   0.00,   0.00,   0.24,   0.20,  -0.24,  -0.20,
23863             0.00,   0.00,  -0.24,   0.20,   0.16,  -0.20,   0.12,   0.10,
23864             0.20,   0.20,   0.00,  -0.10,  -0.12,   0.10,  -0.16,  -0.20,
23865            -0.12,  -0.10,  -0.16,   0.20,   0.20,   0.20,   0.00,   0.00,
23866            -0.20,   0.20,  -0.20,   0.20,  -0.20,   0.20,  -0.20,   0.20,
23867             0.20,  -0.20,  -0.20,  -0.20,   0.00,   0.00,  -0.20,   0.20,
23868             0.20,   0.00,  -0.20,   0.00,   0.00,  -0.20,   0.20,  -0.20,
23869             0.20,  -0.20,  -0.20,  -0.20,  -0.20,   0.00,   0.00,   0.20,
23870             0.20,   0.20,   0.20,   0.12,  -0.20,  -0.12,  -0.10,   0.28,
23871            -0.28,   0.16,  -0.20,   0.00,  -0.10,   0.00,   0.10,  -0.16,
23872 
23873        /* 4308-4435 */
23874             0.20,   0.00,  -0.10,  -0.16,  -0.20,   0.00,  -0.10,   0.16,
23875            -0.20,   0.16,  -0.20,   0.00,   0.00,   0.16,   0.20,  -0.16,
23876             0.20,   0.00,   0.00,   0.16,   0.20,   0.16,  -0.20,   0.16,
23877            -0.20,  -0.16,   0.20,   0.16,  -0.20,   0.00,   0.00,   0.16,
23878             0.20,   0.00,   0.00,   0.16,   0.20,   0.00,   0.00,  -0.16,
23879            -0.20,   0.16,  -0.20,  -0.16,  -0.20,   0.00,   0.00,  -0.16,
23880            -0.20,   0.00,   0.00,  -0.16,   0.20,   0.00,   0.00,   0.16,
23881            -0.20,   0.16,   0.20,   0.16,   0.20,   0.00,   0.00,  -0.16,
23882            -0.20,   0.00,   0.00,  -0.16,  -0.20,   0.00,   0.00,   0.16,
23883             0.20,   0.16,   0.20,   0.00,   0.00,   0.16,   0.20,   0.16,
23884            -0.20,   0.16,   0.20,   0.00,   0.00,  -0.16,   0.20,   0.00,
23885             0.10,   0.12,  -0.20,   0.12,  -0.20,   0.00,  -0.10,   0.00,
23886            -0.10,   0.12,   0.20,   0.00,  -0.10,  -0.12,   0.20,  -0.15,
23887             0.20,  -0.24,   0.24,   0.00,   0.00,   0.24,   0.24,   0.12,
23888            -0.20,  -0.12,  -0.20,   0.00,   0.00,   0.12,   0.20,   0.12,
23889            -0.20,   0.12,   0.20,   0.12,   0.20,   0.12,   0.20,   0.12,
23890 
23891        /* 4436-4563 */
23892            -0.20,  -0.12,   0.20,   0.00,   0.00,   0.12,   0.20,   0.12,
23893             0.00,  -0.20,   0.00,   0.00,  -0.12,  -0.20,   0.12,  -0.20,
23894             0.00,   0.00,   0.12,   0.20,  -0.12,   0.20,  -0.12,   0.20,
23895             0.12,  -0.20,   0.00,   0.00,   0.12,   0.20,   0.20,   0.00,
23896             0.12,   0.00,   0.00,  -0.12,   0.20,   0.00,   0.00,  -0.12,
23897            -0.20,   0.00,   0.00,  -0.12,  -0.20,  -0.12,  -0.20,   0.00,
23898             0.00,   0.12,  -0.20,   0.12,  -0.20,   0.12,   0.20,  -0.12,
23899            -0.20,   0.00,   0.00,   0.12,  -0.20,   0.12,  -0.20,   0.12,
23900             0.20,   0.12,   0.00,   0.20,  -0.12,  -0.20,   0.00,   0.00,
23901             0.12,   0.20,  -0.16,   0.00,   0.16,  -0.20,   0.20,   0.00,
23902             0.00,  -0.20,   0.00,   0.00,  -0.20,   0.20,   0.00,   0.00,
23903             0.20,   0.20,  -0.20,   0.00,   0.00,  -0.20,   0.12,   0.00,
23904            -0.16,   0.20,   0.00,   0.00,   0.20,   0.12,  -0.10,   0.00,
23905             0.10,   0.16,  -0.16,  -0.16,  -0.16,  -0.16,  -0.16,   0.00,
23906             0.00,  -0.16,   0.00,   0.00,  -0.16,  -0.16,  -0.16,   0.00,
23907             0.00,  -0.16,   0.00,   0.00,   0.16,   0.00,   0.00,   0.16,
23908 
23909        /* 4564-4691 */
23910             0.00,   0.00,   0.16,   0.16,   0.00,   0.00,  -0.16,   0.00,
23911             0.00,  -0.16,  -0.16,   0.00,   0.00,   0.16,   0.00,   0.00,
23912            -0.16,  -0.16,   0.00,   0.00,  -0.16,  -0.16,   0.12,   0.10,
23913             0.12,  -0.10,   0.12,   0.10,   0.00,   0.00,   0.12,   0.10,
23914            -0.12,   0.10,   0.00,   0.00,   0.12,   0.10,   0.12,  -0.10,
23915             0.00,   0.00,  -0.12,  -0.10,   0.00,   0.00,   0.12,   0.10,
23916             0.12,   0.00,   0.00,   0.12,   0.00,   0.00,  -0.12,   0.00,
23917             0.00,   0.12,   0.12,   0.12,   0.12,   0.12,   0.00,   0.00,
23918             0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,   0.12,
23919             0.00,   0.00,   0.12,  -0.12,  -0.12,   0.12,   0.12,  -0.12,
23920            -0.12,   0.00,   0.00,   0.12,  -0.12,   0.12,   0.12,  -0.12,
23921            -0.12,   0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23922             0.12,   0.00,   0.00,   0.12,   0.00,   0.00,   0.12,   0.00,
23923             0.00,   0.12,  -0.12,   0.00,   0.00,  -0.12,   0.12,  -0.12,
23924            -0.12,   0.12,   0.00,   0.00,   0.12,   0.12,   0.12,  -0.12,
23925             0.00,   0.00,  -0.12,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23926 
23927        /* 4692-NA */
23928            -0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,  -0.12,
23929            -0.12,  -0.12,  -0.12,   0.12,   0.00,   0.00,   0.12,  -0.12,
23930             0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,   0.12,  -0.12,
23931            -0.12,  -0.12,  -0.12,   0.12,   0.12,  -0.12,  -0.12,   0.00,
23932             0.00,  -0.12,   0.00,   0.00,  -0.12,   0.12,   0.00,   0.00,
23933             0.12,   0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23934            -0.12,   0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,
23935             0.12,   0.00,   0.00,   0.12,   0.12,   0.08,   0.00,   0.04
23936        };
23937 
23938     /* Number of amplitude coefficients */
23939         final int NA = a.length;
23940 
23941     /* Amplitude usage: X or Y, sin or cos, power of T. */
23942         final int jaxy[] = {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1};
23943         final int jasc[] = {0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0};
23944         final int japt[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4};
23945 
23946     /* Miscellaneous */
23947        double t, w, pt[] = new double[MAXPT+1], fa[] = new double[14], xypr[] = new double[2], xypl[] = new double[2], xyls[] = new double[2], arg,
23948               sc[] = new double[2];
23949        int jpt, i, j, jxy, ialast, ifreq, m, ia, jsc;
23950 
23951     /*--------------------------------------------------------------------*/
23952 
23953     /* Interval between fundamental date J2000.0 and given date (JC). */
23954        t = ((date1 - DJ00) + date2) / DJC;
23955 
23956     /* Powers of T. */
23957        w = 1.0;
23958        for (jpt = 0; jpt <= MAXPT; jpt++) {
23959           pt[jpt] = w;
23960           w *= t;
23961        }
23962 
23963     /* Initialize totals in X and Y:  polynomial, luni-solar, planetary. */
23964        for (jxy = 0; jxy < 2; jxy++) {
23965           xypr[jxy] = 0.0;
23966           xyls[jxy] = 0.0;
23967           xypl[jxy] = 0.0;
23968        }
23969 
23970     /* --------------------------------- */
23971     /* Fundamental arguments (IERS 2003) */
23972     /* --------------------------------- */
23973 
23974     /* Mean anomaly of the Moon. */
23975        fa[0] = jauFal03(t);
23976 
23977     /* Mean anomaly of the Sun. */
23978        fa[1] = jauFalp03(t);
23979 
23980     /* Mean argument of the latitude of the Moon. */
23981        fa[2] = jauFaf03(t);
23982 
23983     /* Mean elongation of the Moon from the Sun. */
23984        fa[3] = jauFad03(t);
23985 
23986     /* Mean longitude of the ascending node of the Moon. */
23987        fa[4] = jauFaom03(t);
23988 
23989     /* Planetary longitudes, Mercury through Neptune. */
23990        fa[5] = jauFame03(t);
23991        fa[6] = jauFave03(t);
23992        fa[7] = jauFae03(t);
23993        fa[8] = jauFama03(t);
23994        fa[9] = jauFaju03(t);
23995        fa[10] = jauFasa03(t);
23996        fa[11] = jauFaur03(t);
23997        fa[12] = jauFane03(t);
23998 
23999     /* General accumulated precession in longitude. */
24000        fa[13] = jauFapa03(t);
24001 
24002     /* -------------------------------------- */
24003     /* Polynomial part of precession-nutation */
24004     /* -------------------------------------- */
24005 
24006        for (jxy = 0; jxy < 2; jxy++) {
24007           for (j = MAXPT; j >= 0; j--) {
24008              xypr[jxy] += xyp[jxy][j] * pt[j];
24009           }
24010        }
24011 
24012     /* ---------------------------------- */
24013     /* Nutation periodic terms, planetary */
24014     /* ---------------------------------- */
24015 
24016     /* Work backwards through the coefficients per frequency list. */
24017        ialast = NA;
24018        for (ifreq = NFPL-1; ifreq >= 0; ifreq--) {
24019 
24020        /* Obtain the argument functions. */
24021           arg = 0.0;
24022           for (i = 0; i < 14; i++) {
24023              m = mfapl[ifreq][i];
24024              if (m != 0) arg += (double)m * fa[i];
24025           }
24026           sc[0] = sin(arg);
24027           sc[1] = cos(arg);
24028 
24029        /* Work backwards through the amplitudes at this frequency. */
24030           ia = nc[ifreq+NFLS];
24031           for (i = ialast; i >= ia; i--) {
24032 
24033           /* Coefficient number (0 = 1st). */
24034              j = i-ia;
24035 
24036           /* X or Y. */
24037              jxy = jaxy[j];
24038 
24039           /* Sin or cos. */
24040              jsc = jasc[j];
24041 
24042           /* Power of T. */
24043              jpt = japt[j];
24044 
24045           /* Accumulate the component. */
24046              xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24047           }
24048           ialast = ia-1;
24049        }
24050 
24051     /* ----------------------------------- */
24052     /* Nutation periodic terms, luni-solar */
24053     /* ----------------------------------- */
24054 
24055     /* Continue working backwards through the number of coefficients list. */
24056        for (ifreq = NFLS-1; ifreq >= 0; ifreq--) {
24057 
24058        /* Obtain the argument functions. */
24059           arg = 0.0;
24060           for (i = 0; i < 5; i++) {
24061              m = mfals[ifreq][i];
24062              if (m != 0) arg += (double)m * fa[i];
24063           }
24064           sc[0] = sin(arg);
24065           sc[1] = cos(arg);
24066 
24067        /* Work backwards through the amplitudes at this frequency. */
24068           ia = nc[ifreq];
24069           for (i = ialast; i >= ia; i--) {
24070 
24071           /* Coefficient number (0 = 1st). */
24072              j = i-ia;
24073 
24074           /* X or Y. */
24075              jxy = jaxy[j];
24076 
24077           /* Sin or cos. */
24078              jsc = jasc[j];
24079 
24080           /* Power of T. */
24081              jpt = japt[j];
24082 
24083           /* Accumulate the component. */
24084              xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24085           }
24086           ialast = ia-1;
24087        }
24088 
24089     /* ------------------------------------ */
24090     /* Results:  CIP unit vector components */
24091     /* ------------------------------------ */
24092 
24093        double x = DAS2R * (xypr[0] + (xyls[0] + xypl[0]) / 1e6);
24094        double y = DAS2R * (xypr[1] + (xyls[1] + xypl[1]) / 1e6);
24095 
24096        return new CelestialIntermediatePole(x, y);
24097 
24098         }
24099     
24100 
24101     /**
24102     *  For a given TT date, compute the X,Y coordinates of the Celestial
24103     *  Intermediate Pole and the CIO locator s, using the IAU 2000A
24104     *  precession-nutation model.
24105     *
24106     *<p>This function is derived from the International Astronomical Union's
24107     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24108     *
24109     *<p>Status:  support function.
24110     *
24111     *<!-- Given: -->
24112     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24113     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24114     *
24115     *<!-- Returned: -->
24116     *     @return x double     <u>returned</u> Celestial Intermediate Pole (Note 2)
24117     *             y double     <u>returned</u> Celestial Intermediate Pole (Note 2) 
24118     *             s double     <u>returned</u> the CIO locator s (Note 2)
24119     *
24120     * <p>Notes:
24121     * <ol>
24122     *
24123     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24124     *     convenient way between the two arguments.  For example,
24125     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24126     *     among others:
24127     *<pre>
24128     *            date1          date2
24129     *
24130     *         2450123.7           0.0       (JD method)
24131     *         2451545.0       -1421.3       (J2000 method)
24132     *         2400000.5       50123.2       (MJD method)
24133     *         2450123.5           0.2       (date &amp; time method)
24134     *</pre>
24135     *     The JD method is the most natural and convenient to use in
24136     *     cases where the loss of several decimal digits of resolution
24137     *     is acceptable.  The J2000 method is best matched to the way
24138     *     the argument is handled internally and will deliver the
24139     *     optimum resolution.  The MJD method and the date &amp; time methods
24140     *     are both good compromises between resolution and convenience.
24141     *
24142     * <li> The Celestial Intermediate Pole coordinates are the x,y
24143     *     components of the unit vector in the Geocentric Celestial
24144     *     Reference System.
24145     *
24146     * <li> The CIO locator s (in radians) positions the Celestial
24147     *     Intermediate Origin on the equator of the CIP.
24148     *
24149     * <li> A faster, but slightly less accurate result (about 1 mas for
24150     *     X,Y), can be obtained by using instead the jauXys00b function.
24151     *</ol>
24152     *<p>Called:<ul>
24153     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
24154     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24155     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24156     * </ul>
24157     *<p>Reference:
24158     *
24159     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24160     *     IERS Technical Note No. 32, BKG (2004)
24161     *
24162     *@version 2008 May 12
24163     *
24164     *  @since Release 20101201
24165     *
24166     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24167     */
24168     public static ICRFrame jauXys00a(double date1, double date2)
24169     {
24170 
24171     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24172        double rbpn[][] = jauPnm00a(date1, date2);
24173 
24174     /* Extract X,Y. */
24175        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24176 
24177     /* Obtain s. */
24178        double s = jauS00(date1, date2, cip.x, cip.y);
24179 
24180        return new ICRFrame(cip, s);
24181 
24182         }
24183     
24184 
24185     /**
24186      *    The Celestial Intermediate Pole coordinates are the x,y
24187     *     components of the unit vector in the Geocentric Celestial
24188     *     Reference System.
24189     *
24190     *  The CIO locator s (in radians) positions the Celestial
24191     *     Intermediate Origin on the equator of the CIP.
24192  
24193      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
24194      * 
24195      * @since AIDA Stage 1
24196      */
24197     public static class ICRFrame {
24198         public CelestialIntermediatePole cip;
24199         public double s;
24200         public ICRFrame(CelestialIntermediatePole cip, double s) {
24201             this.cip = cip;
24202             this.s = s;
24203         }
24204     }
24205     /**
24206     *  For a given TT date, compute the X,Y coordinates of the Celestial
24207     *  Intermediate Pole and the CIO locator s, using the IAU 2000B
24208     *  precession-nutation model.
24209     *
24210     *<p>This function is derived from the International Astronomical Union's
24211     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24212     *
24213     *<p>Status:  support function.
24214     *
24215     *<!-- Given: -->
24216     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24217     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24218     *
24219     *<!-- Returned: -->
24220     *     @return x double     <u>returned</u> Celestial Intermediate Pole (Note 2)
24221     *             y double     <u>returned</u> Celestial Intermediate Pole (Note 2) 
24222     *             s             double     <u>returned</u> the CIO locator s (Note 2)
24223     *
24224     * <p>Notes:
24225     * <ol>
24226     *
24227     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24228     *     convenient way between the two arguments.  For example,
24229     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24230     *     among others:
24231     *<pre>
24232     *            date1          date2
24233     *
24234     *         2450123.7           0.0       (JD method)
24235     *         2451545.0       -1421.3       (J2000 method)
24236     *         2400000.5       50123.2       (MJD method)
24237     *         2450123.5           0.2       (date &amp; time method)
24238     *</pre>
24239     *     The JD method is the most natural and convenient to use in
24240     *     cases where the loss of several decimal digits of resolution
24241     *     is acceptable.  The J2000 method is best matched to the way
24242     *     the argument is handled internally and will deliver the
24243     *     optimum resolution.  The MJD method and the date &amp; time methods
24244     *     are both good compromises between resolution and convenience.
24245     *
24246     * <li> The Celestial Intermediate Pole coordinates are the x,y
24247     *     components of the unit vector in the Geocentric Celestial
24248     *     Reference System.
24249     *
24250     * <li> The CIO locator s (in radians) positions the Celestial
24251     *     Intermediate Origin on the equator of the CIP.
24252     *
24253     * <li> The present function is faster, but slightly less accurate (about
24254     *     1 mas in X,Y), than the jauXys00a function.
24255     *</ol>
24256     *<p>Called:<ul>
24257     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
24258     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24259     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24260     * </ul>
24261     *<p>Reference:
24262     *
24263     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24264     *     IERS Technical Note No. 32, BKG (2004)
24265     *
24266     *@version 2008 May 12
24267     *
24268     *  @since Release 20101201
24269     *
24270     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24271     */
24272     public static ICRFrame jauXys00b(double date1, double date2)
24273     {
24274        double rbpn[][] = new double[3][3];
24275 
24276 
24277     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24278        rbpn = jauPnm00b(date1, date2);
24279 
24280     /* Extract X,Y. */
24281        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24282 
24283     /* Obtain s. */
24284        double s = jauS00(date1, date2, cip.x, cip.y);
24285 
24286        return new ICRFrame(cip, s);
24287 
24288         }
24289     
24290 
24291     /**
24292     *  For a given TT date, compute the X,Y coordinates of the Celestial
24293     *  Intermediate Pole and the CIO locator s, using the IAU 2006
24294     *  precession and IAU 2000A nutation models.
24295     *
24296     *<p>This function is derived from the International Astronomical Union's
24297     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24298     *
24299     *<p>Status:  support function.
24300     *
24301     *<!-- Given: -->
24302     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24303     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24304     *
24305     *<!-- Returned: -->
24306     *     @return x double    <u>returned</u> Celestial Intermediate Pole (Note 2)
24307     *             y double    <u>returned</u> Celestial Intermediate Pole (Note 2) 
24308     *             s             double    <u>returned</u> the CIO locator s (Note 2)
24309     *
24310     * <p>Notes:
24311     * <ol>
24312     *
24313     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24314     *     convenient way between the two arguments.  For example,
24315     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24316     *     among others:
24317     *<pre>
24318     *            date1          date2
24319     *
24320     *         2450123.7           0.0       (JD method)
24321     *         2451545.0       -1421.3       (J2000 method)
24322     *         2400000.5       50123.2       (MJD method)
24323     *         2450123.5           0.2       (date &amp; time method)
24324     *</pre>
24325     *     The JD method is the most natural and convenient to use in
24326     *     cases where the loss of several decimal digits of resolution
24327     *     is acceptable.  The J2000 method is best matched to the way
24328     *     the argument is handled internally and will deliver the
24329     *     optimum resolution.  The MJD method and the date &amp; time methods
24330     *     are both good compromises between resolution and convenience.
24331     *
24332     * <li> The Celestial Intermediate Pole coordinates are the x,y components
24333     *     of the unit vector in the Geocentric Celestial Reference System.
24334     *
24335     * <li> The CIO locator s (in radians) positions the Celestial
24336     *     Intermediate Origin on the equator of the CIP.
24337     *
24338     * <li> Series-based solutions for generating X and Y are also available:
24339     *     see Capitaine &amp; Wallace (2006) and jauXy06.
24340     *</ol>
24341     *<p>Called:<ul>
24342     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
24343     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24344     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
24345     * </ul>
24346     *<p>References:
24347     *
24348     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
24349     *
24350     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
24351     *
24352     *@version 2008 May 11
24353     *
24354     *  @since Release 20101201
24355     *
24356     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24357     */
24358     public static ICRFrame jauXys06a(double date1, double date2)
24359     {
24360        double rbpn[][] = new double[3][3];
24361 
24362 
24363     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24364        rbpn = jauPnm06a(date1, date2);
24365 
24366     /* Extract X,Y. */
24367        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24368 
24369     /* Obtain s. */
24370        double s = jauS06(date1, date2, cip.x, cip.y);
24371 
24372        return new ICRFrame(cip, s);
24373 
24374         }
24375     
24376 
24377     /**
24378     *  Zero a p-vector.
24379     *
24380     *<p>This function is derived from the International Astronomical Union's
24381     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24382     *
24383     *<p>Status:  vector/matrix support function.
24384     *
24385     *<!-- Returned: -->
24386     *     @param p         double[3]        <u>returned</u> p-vector
24387     *
24388     *@version 2008 May 11
24389     *
24390     *  @since Release 20101201
24391     *
24392     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24393     */
24394     public static void jauZp(double p[] )
24395     {
24396        p[0] = 0.0;
24397        p[1] = 0.0;
24398        p[2] = 0.0;
24399 
24400        return;
24401 
24402         }
24403     
24404 
24405     /**
24406     *  Zero a pv-vector.
24407     *
24408     *<p>This function is derived from the International Astronomical Union's
24409     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24410     *
24411     *<p>Status:  vector/matrix support function.
24412     *
24413     *<!-- Returned: -->
24414     *     @param pv        double[2][3]        <u>returned</u> pv-vector
24415     *
24416     *<p>Called:<ul>
24417     *     <li>{@link #jauZp} zero p-vector
24418     * </ul>
24419     *@version 2008 May 11
24420     *
24421     *  @since Release 20101201
24422     *
24423     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24424     */
24425     public static void jauZpv(double pv[][])
24426     {
24427        jauZp(pv[0]);
24428        jauZp(pv[1]);
24429 
24430        return;
24431 
24432         }
24433     
24434 
24435     /**
24436     *  Initialize an r-matrix to the null matrix.
24437     *
24438     *<p>This function is derived from the International Astronomical Union's
24439     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24440     *
24441     *<p>Status:  vector/matrix support function.
24442     *
24443     *<!-- Returned: -->
24444     *     @param r         double[3][3]      <u>returned</u> r-matrix
24445     *
24446     *@version 2008 May 11
24447     *
24448     *  @since Release 20101201 
24449     *
24450     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24451     */
24452     public static void jauZr(double r[][])
24453     {
24454        int i, j;
24455 
24456 
24457        for (i = 0; i < 3; i++) {
24458           for (j = 0; j < 3; j++) {
24459              r[i][j] = 0.0;
24460           }
24461        }
24462 
24463        return;
24464 
24465         }
24466     
24467 
24468     /**
24469      * returns the first argument modulo the second.
24470      * Utility function to retain C use of fmod.
24471      * @param d
24472      * @param d2
24473      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 27 Jan 2010
24474      * @return
24475      */
24476     private static double fmod(double d, double d2) {
24477         return d % d2;
24478     }
24479  //IMPL new 20131202 routines after here
24480 
24481     /**
24482      *  Star-independent astrometry parameters.
24483      * 
24484      *  (Vectors eb, eh, em and v are all with respect to BCRS axes.)
24485      *  
24486      *  @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24487      *  @since 20131202
24488      */
24489     public static class  Astrom {
24490         
24491 /** PM time interval (SSB, Julian years) */
24492        public double pmt;       
24493 /** SSB to observer (vector, au) [3]*/
24494        public double eb[] = new double[3];      
24495 /** Sun to observer (unit vector)[3] */
24496        public double eh[] = new double[3];      
24497 /** distance from Sun to observer (au) */
24498        public double em;         
24499 /** barycentric observer velocity (vector, c)[3] */
24500        public double v[] = new double[3];       
24501 /** sqrt(1-|v|^2): reciprocal of Lorenz factor */
24502        public double bm1;        
24503 /** bias-precession-nutation matrix [3][3] */
24504        public double bpn[][] = new double[3][3];  
24505 /** longitude + s' + dERA(DUT) (radians) */
24506        public double along;      
24507 /** geodetic latitude (radians) */
24508        public double phi;        
24509 /** polar motion xp wrt local meridian (radians) */
24510        public double xpl;        
24511 /** polar motion yp wrt local meridian (radians) */
24512        public double ypl;        
24513 /** sine of geodetic latitude */
24514        public double sphi;       
24515 /** cosine of geodetic latitude */
24516        public double cphi;       
24517 /** magnitude of diurnal aberration vector */
24518        public double diurab;     
24519 /** "local" Earth rotation angle (radians) */
24520        public double eral;       
24521 /** refraction constant A (radians) */
24522        public double refa;       
24523 /** refraction constant B (radians) */
24524        public double refb;       
24525        
24526        /**
24527         * 
24528         */
24529        public Astrom(){}
24530     } ;
24531 
24532     /**
24533      *  Body parameters for light deflection.
24534      *  @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24535      *  @since 20131202
24536      */
24537     public static class Ldbody {
24538         /** mass of the body (solar masses) */
24539        public double bm;
24540        /** deflection limiter (radians^2/2) */
24541        public double dl; 
24542        /** barycentric PV of the body (au, au/day)[2][3] */
24543        public double pv[][] = new double [2][3];   
24544     } ;
24545 
24546 
24547     /**
24548      *  Apply aberration to transform natural direction into proper
24549      *  direction.
24550      *
24551      *<p>This function is derived from the International Astronomical Union's
24552      *  SOFA (Standards of Fundamental Astronomy) software collection.
24553      *
24554      *<p>Status:  support function.
24555      *
24556      *<!-- Given: -->
24557      *    @param pnat     double[3]    natural direction to the source (unit vector)
24558      *    @param v        double[3]    observer barycentric velocity in units of c
24559      *    @param s        double       distance between the Sun and the observer (au)
24560      *    @param bm1      double       sqrt(1-|v|^2): reciprocal of Lorenz factor
24561      *
24562      *<!-- Returned:-->
24563      *    @return ppr      double[3]     <b>Returned</b> proper direction to source (unit vector)
24564      *
24565      *<p>Notes:
24566      * <ol>
24567      *
24568      *  <li> The algorithm is based on Expr. (7.40) in the Explanatory
24569      *     Supplement (Urban &amp; Seidelmann 2013), but with the following
24570      *     changes:
24571      *
24572      *     <p>o  Rigorous rather than approximate normalization is applied.
24573      *
24574      *     <p>o  The gravitational potential term from Expr. (7) in
24575      *        Klioner (2003) is added, taking into account only the Sun's
24576      *        contribution.  This has a maximum effect of about
24577      *        0.4 microarcsecond.
24578      *
24579      *  <li> In almost all cases, the maximum accuracy will be limited by the
24580      *     supplied velocity.  For example, if the SOFA iauEpv00 function is
24581      *     used, errors of up to 5 microarcseconds could occur.
24582      *
24583      * </ol>
24584      *<p>References:
24585      * <ul>
24586      *
24587      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
24588      *     the Astronomical Almanac, 3rd ed., University Science Books
24589      *     (2013).
24590      *
24591      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
24592      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
24593      *
24594      * </ul>
24595      *  Called:
24596      * <ul>
24597      *     <li>{@link #jauPdp} scalar product of two p-vectors
24598      *
24599      * </ul>
24600      *@version  2013 October 9
24601      *
24602      *@since JSOFA release 20131202
24603      *
24604      *
24605      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24606      */
24607     public static  double[] jauAb(double pnat[], double v[], double s, double bm1
24608            )
24609     {
24610         int i;
24611         double pdv, w1, w2, r2, w, p[] = new double[3], r;
24612         double ppr[] = new double[3];
24613 
24614         pdv = jauPdp(pnat, v);
24615         w1 = 1.0 + pdv/(1.0 + bm1);
24616         w2 = SRS/s;
24617         r2 = 0.0;
24618         for (i = 0; i < 3; i++) {
24619             w = pnat[i]*bm1 + w1*v[i] + w2*(v[i] - pdv*pnat[i]);
24620             p[i] = w;
24621             r2 = r2 + w*w;
24622         }
24623         r = sqrt(r2);
24624         for (i = 0; i < 3; i++) {
24625             ppr[i] = p[i]/r;
24626         }
24627         return ppr;
24628         /* Finished. */
24629 
24630 
24631     }
24632 
24633     /**
24634      *  For a geocentric observer, prepare star-independent astrometry
24635      *  parameters for transformations between ICRS and GCRS coordinates.
24636      *  The Earth ephemeris is supplied by the caller.
24637      *
24638      *  The parameters produced by this function are required in the
24639      *  parallax, light deflection and aberration parts of the astrometric
24640      *  transformation chain.
24641      *
24642      *<p>This function is derived from the International Astronomical Union's
24643      *  SOFA (Standards of Fundamental Astronomy) software collection.
24644      *
24645      *<p>Status:  support function.
24646      *
24647      *<!-- Given: -->
24648      *     @param date1   double        TDB as a 2-part...
24649      *     @param date2   double        ...Julian Date (Note 1)
24650      *     @param ebpv    double[2][3]  Earth barycentric pos/vel (au, au/day)
24651      *     @param ehp     double[3]     Earth heliocentric position (au)
24652      *
24653      *<!-- Returned:-->
24654      *     @param astrom  jauASTROM     <b>Returned</b> star-independent astrometry parameters:
24655      *
24656      *<p>Notes:
24657      * <ol>
24658      *
24659      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24660      *     convenient way between the two arguments.  For example,
24661      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24662      *     others:
24663      *     <pre>
24664      *           date1          date2
24665      *
24666      *         2450123.7           0.0       (JD method)
24667      *         2451545.0       -1421.3       (J2000 method)
24668      *         2400000.5       50123.2       (MJD method)
24669      *         2450123.5           0.2       (date &amp; time method)
24670      *     </pre>
24671      *     <p>The JD method is the most natural and convenient to use in cases
24672      *     where the loss of several decimal digits of resolution is
24673      *     acceptable.  The J2000 method is best matched to the way the
24674      *     argument is handled internally and will deliver the optimum
24675      *     resolution.  The MJD method and the date &amp; time methods are both
24676      *     good compromises between resolution and convenience.  For most
24677      *     applications of this function the choice will not be at all
24678      *     critical.
24679      *
24680      *     <p>TT can be used instead of TDB without any significant impact on
24681      *     accuracy.
24682      *
24683      *  <li> All the vectors are with respect to BCRS axes.
24684      *
24685      *  <li> This is one of several functions that inserts into the astrom
24686      *     structure star-independent parameters needed for the chain of
24687      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed}.
24688      *
24689      *     <p>The various functions support different classes of observer and
24690      *     portions of the transformation chain:
24691      *     <pre>{@literal
24692      *          functions         observer        transformation
24693      *
24694      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24695      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24696      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24697      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24698      *       iauAper iauAper13    terrestrial     update Earth rotation
24699      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24700      *     }</pre>
24701      *     
24702      *     <p>Those with names ending in "13" use contemporary SOFA models to
24703      *     compute the various ephemerides.  The others accept ephemerides
24704      *     supplied by the caller.
24705      *
24706      *     <p>The transformation from ICRS to GCRS covers space motion,
24707      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24708      *     comprises frame bias and precession-nutation.  From CIRS to
24709      *     observed takes account of Earth rotation, polar motion, diurnal
24710      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24711      *     transformation), and atmospheric refraction.
24712      *
24713      *  <li> The context structure astrom produced by this function is used by
24714      *     iauAtciq* and iauAticq*.
24715      *
24716      * </ol>
24717      *  Called:
24718      * <ul>
24719      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
24720      *
24721      * </ul>
24722      *@version  2013 October 9
24723      *
24724      *@since JSOFA release 20131202
24725      *
24726      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24727      */
24728     public static void jauApcg(double date1, double date2,
24729             double ebpv[][], double ehp[],
24730             Astrom astrom)
24731     {
24732         /* Geocentric observer */
24733         double pv[][] = { { 0.0, 0.0, 0.0 },
24734             { 0.0, 0.0, 0.0 } };
24735 
24736 
24737             /* Compute the star-independent astrometry parameters. */
24738             jauApcs(date1, date2, pv, ebpv, ehp, astrom);
24739 
24740             /* Finished. */
24741 
24742 
24743     }
24744 
24745     /**
24746      *  For a geocentric observer, prepare star-independent astrometry
24747      *  parameters for transformations between ICRS and GCRS coordinates.
24748      *  The caller supplies the date, and SOFA models are used to predict
24749      *  the Earth ephemeris.
24750      *
24751      *  The parameters produced by this function are required in the
24752      *  parallax, light deflection and aberration parts of the astrometric
24753      *  transformation chain.
24754      *
24755      *<p>This function is derived from the International Astronomical Union's
24756      *  SOFA (Standards of Fundamental Astronomy) software collection.
24757      *
24758      *<p>Status:  support function.
24759      *
24760      *<!-- Given: -->
24761      *     @param date1   double      TDB as a 2-part...
24762      *     @param date2   double      ...Julian Date (Note 1)
24763      *
24764      *<!-- Returned:-->
24765      *     @param astrom     <b>Returned</b> star-independent astrometry parameters:
24766      *
24767      *<p>Notes:
24768      * <ol>
24769      *
24770      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24771      *     convenient way between the two arguments.  For example,
24772      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24773      *     others:
24774      *     <pre>
24775      *            date1          date2
24776      *
24777      *         2450123.7           0.0       (JD method)
24778      *         2451545.0       -1421.3       (J2000 method)
24779      *         2400000.5       50123.2       (MJD method)
24780      *         2450123.5           0.2       (date &amp; time method)
24781      *     </pre>
24782      *     <p>The JD method is the most natural and convenient to use in cases
24783      *     where the loss of several decimal digits of resolution is
24784      *     acceptable.  The J2000 method is best matched to the way the
24785      *     argument is handled internally and will deliver the optimum
24786      *     resolution.  The MJD method and the date &amp; time methods are both
24787      *     good compromises between resolution and convenience.  For most
24788      *     applications of this function the choice will not be at all
24789      *     critical.
24790      *
24791      *     <p>TT can be used instead of TDB without any significant impact on
24792      *     accuracy.
24793      *
24794      *  <li> All the vectors are with respect to BCRS axes.
24795      *
24796      *  <li> In cases where the caller wishes to supply his own Earth
24797      *     ephemeris, the function iauApcg can be used instead of the present
24798      *     function.
24799      *
24800      *  <li> This is one of several functions that inserts into the astrom
24801      *     structure star-independent parameters needed for the chain of
24802      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed}.
24803      *
24804      *     <p>The various functions support different classes of observer and
24805      *     portions of the transformation chain:
24806      *     <pre>
24807      *     {@literal
24808      *          functions         observer        transformation
24809      *
24810      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24811      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24812      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24813      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24814      *       iauAper iauAper13    terrestrial     update Earth rotation
24815      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24816      *     }
24817      *     </pre>
24818      *     <p>Those with names ending in "13" use contemporary SOFA models to
24819      *     compute the various ephemerides.  The others accept ephemerides
24820      *     supplied by the caller.
24821      *
24822      *     <p>The transformation from ICRS to GCRS covers space motion,
24823      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24824      *     comprises frame bias and precession-nutation.  From CIRS to
24825      *     observed takes account of Earth rotation, polar motion, diurnal
24826      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24827      *     transformation), and atmospheric refraction.
24828      *
24829      *  <li> The context structure astrom produced by this function is used by
24830      *     iauAtciq* and iauAticq*.
24831      *
24832      * </ol>
24833      *  Called:
24834      * <ul>
24835      *     <li>{@link #jauEpv00} Earth position and velocity
24836      *     <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24837      *
24838      * </ul>
24839      *@version  2013 October 9
24840      *
24841      *@since JSOFA release 20131202
24842      *
24843      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24844      */
24845     public static void jauApcg13(double date1, double date2, Astrom astrom)
24846     {
24847         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
24848 
24849 
24850         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
24851         jauEpv00(date1, date2, ehpv, ebpv);
24852 
24853         /* Compute the star-independent astrometry parameters. */
24854         jauApcg(date1, date2, ebpv, ehpv[0], astrom);
24855 
24856         /* Finished. */
24857 
24858 
24859     }
24860 
24861     /**
24862      *  For a terrestrial observer, prepare star-independent astrometry
24863      *  parameters for transformations between ICRS and geocentric CIRS
24864      *  coordinates.  The Earth ephemeris and CIP/CIO are supplied by the
24865      *  caller.
24866      *
24867      *  The parameters produced by this function are required in the
24868      *  parallax, light deflection, aberration, and bias-precession-nutation
24869      *  parts of the astrometric transformation chain.
24870      *
24871      *<p>This function is derived from the International Astronomical Union's
24872      *  SOFA (Standards of Fundamental Astronomy) software collection.
24873      *
24874      *<p>Status:  support function.
24875      *
24876      *<!-- Given: -->
24877      *     @param date1   double        TDB as a 2-part...
24878      *     @param date2   double        ...Julian Date (Note 1)
24879      *     @param ebpv    double[2][3]  Earth barycentric position/velocity (au, au/day)
24880      *     @param ehp     double[3]     Earth heliocentric position (au)
24881      *     @param x double        CIP X,Y (components of unit vector)
24882      *     @param y double        CIP X,Y (components of unit vector) 
24883      *     @param s       double        the CIO locator s (radians)
24884      *
24885      *<!-- Returned:-->
24886      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
24887      *
24888      *<p>Notes:
24889      * <ol>
24890      *
24891      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24892      *     convenient way between the two arguments.  For example,
24893      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24894      *     others:
24895      *     <pre>
24896      *            date1          date2
24897      *
24898      *         2450123.7           0.0       (JD method)
24899      *         2451545.0       -1421.3       (J2000 method)
24900      *         2400000.5       50123.2       (MJD method)
24901      *         2450123.5           0.2       (date &amp; time method)
24902      *     </pre>
24903      *     <p>The JD method is the most natural and convenient to use in cases
24904      *     where the loss of several decimal digits of resolution is
24905      *     acceptable.  The J2000 method is best matched to the way the
24906      *     argument is handled internally and will deliver the optimum
24907      *     resolution.  The MJD method and the date &amp; time methods are both
24908      *     good compromises between resolution and convenience.  For most
24909      *     applications of this function the choice will not be at all
24910      *     critical.
24911      *
24912      *     <p>TT can be used instead of TDB without any significant impact on
24913      *     accuracy.
24914      *
24915      *  <li> All the vectors are with respect to BCRS axes.
24916      *
24917      *  <li> In cases where the caller does not wish to provide the Earth
24918      *     ephemeris and CIP/CIO, the function iauApci13 can be used instead
24919      *     of the present function.  This computes the required quantities
24920      *     using other SOFA functions.
24921      *
24922      *  <li> This is one of several functions that inserts into the astrom
24923      *     structure star-independent parameters needed for the chain of
24924      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
24925      *
24926      *     <p>The various functions support different classes of observer and
24927      *     portions of the transformation chain:
24928      *     <pre>{@literal
24929      *          functions         observer        transformation
24930      *
24931      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24932      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24933      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24934      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24935      *       iauAper iauAper13    terrestrial     update Earth rotation
24936      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24937      *     }</pre>
24938      *     <p>Those with names ending in "13" use contemporary SOFA models to
24939      *     compute the various ephemerides.  The others accept ephemerides
24940      *     supplied by the caller.
24941      *
24942      *     <p>The transformation from ICRS to GCRS covers space motion,
24943      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24944      *     comprises frame bias and precession-nutation.  From CIRS to
24945      *     observed takes account of Earth rotation, polar motion, diurnal
24946      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24947      *     transformation), and atmospheric refraction.
24948      *
24949      *  <li> The context structure astrom produced by this function is used by
24950      *     iauAtciq* and iauAticq*.
24951      *
24952      * </ol>
24953      *  Called:
24954      * <ul>
24955      *     <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24956      *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
24957      *
24958      * </ul>
24959      *@version  2013 September 25
24960      *
24961      *@since JSOFA release 20131202
24962      *
24963      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24964      */
24965     public static void jauApci(double date1, double date2,
24966             double ebpv[][], double ehp[],
24967             double x, double y, double s,
24968             Astrom astrom)
24969     {
24970 
24971         /* Star-independent astrometry parameters for geocenter. */
24972         jauApcg(date1, date2, ebpv, ehp, astrom);
24973 
24974         /* CIO based BPN matrix. */
24975         astrom.bpn = jauC2ixys(x, y, s);
24976 
24977         /* Finished. */
24978 
24979 
24980     }
24981 
24982     /**
24983      *  For a terrestrial observer, prepare star-independent astrometry
24984      *  parameters for transformations between ICRS and geocentric CIRS
24985      *  coordinates.  The caller supplies the date, and SOFA models are used
24986      *  to predict the Earth ephemeris and CIP/CIO.
24987      *
24988      *  The parameters produced by this function are required in the
24989      *  parallax, light deflection, aberration, and bias-precession-nutation
24990      *  parts of the astrometric transformation chain.
24991      *
24992      *<p>This function is derived from the International Astronomical Union's
24993      *  SOFA (Standards of Fundamental Astronomy) software collection.
24994      *
24995      *<p>Status:  support function.
24996      *
24997      *<!-- Given: -->
24998      *     @param date1   double       TDB as a 2-part...
24999      *     @param date2   double       ...Julian Date (Note 1)
25000      *     
25001      *<!-- Returned:-->
25002      *     @param astrom  jauASTROM    <b>Returned</b> star-independent astrometry parameters:
25003      *                    pmt     double         <b>Returned</b> PM time interval (SSB, Julian years)
25004      *                    eb      double[3]      <b>Returned</b> SSB to observer (vector, au)
25005      *                    eh      double[3]      <b>Returned</b> Sun to observer (unit vector)
25006      *                    em      double         <b>Returned</b> distance from Sun to observer (au)
25007      *                    v       double[3]      <b>Returned</b> barycentric observer velocity (vector, c)
25008      *                    bm1     double         <b>Returned</b> sqrt(1-|v|^2): reciprocal of Lorenz factor
25009      *                    bpn     double[3][3]   <b>Returned</b> bias-precession-nutation matrix
25010      *                    along   double         <b>Returned</b> unchanged
25011      *                    xpl     double         <b>Returned</b> unchanged
25012      *                    ypl     double         <b>Returned</b> unchanged
25013      *                    sphi    double         <b>Returned</b> unchanged
25014      *                    cphi    double         <b>Returned</b> unchanged
25015      *                    diurab  double         <b>Returned</b> unchanged
25016      *                    eral    double         <b>Returned</b> unchanged
25017      *                    refa    double         <b>Returned</b> unchanged
25018      *                    refb    double         <b>Returned</b> unchanged
25019      *     @return       double*       <b>Returned</b> equation of the origins (ERA-GST)
25020      *
25021      *<p>Notes:
25022      * <ol>
25023      *
25024      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25025      *     convenient way between the two arguments.  For example,
25026      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25027      *     others:
25028      *     <pre>
25029      *            date1          date2
25030      *
25031      *         2450123.7           0.0       (JD method)
25032      *         2451545.0       -1421.3       (J2000 method)
25033      *         2400000.5       50123.2       (MJD method)
25034      *         2450123.5           0.2       (date &amp; time method)
25035      *     </pre>
25036      *     <p>The JD method is the most natural and convenient to use in cases
25037      *     where the loss of several decimal digits of resolution is
25038      *     acceptable.  The J2000 method is best matched to the way the
25039      *     argument is handled internally and will deliver the optimum
25040      *     resolution.  The MJD method and the date &amp; time methods are both
25041      *     good compromises between resolution and convenience.  For most
25042      *     applications of this function the choice will not be at all
25043      *     critical.
25044      *
25045      *     <p>TT can be used instead of TDB without any significant impact on
25046      *     accuracy.
25047      *
25048      *  <li> All the vectors are with respect to BCRS axes.
25049      *
25050      *  <li> In cases where the caller wishes to supply his own Earth
25051      *     ephemeris and CIP/CIO, the function iauApci can be used instead
25052      *     of the present function.
25053      *
25054      *  <li> This is one of several functions that inserts into the astrom
25055      *     structure star-independent parameters needed for the chain of
25056      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25057      *
25058      *     <p>The various functions support different classes of observer and
25059      *     portions of the transformation chain:
25060      *     <pre>{@literal
25061      *          functions         observer        transformation
25062      *
25063      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25064      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25065      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25066      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25067      *       iauAper iauAper13    terrestrial     update Earth rotation
25068      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25069      *     }</pre>
25070      *     <p>Those with names ending in "13" use contemporary SOFA models to
25071      *     compute the various ephemerides.  The others accept ephemerides
25072      *     supplied by the caller.
25073      *
25074      *     <p>The transformation from ICRS to GCRS covers space motion,
25075      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25076      *     comprises frame bias and precession-nutation.  From CIRS to
25077      *     observed takes account of Earth rotation, polar motion, diurnal
25078      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25079      *     transformation), and atmospheric refraction.
25080      *
25081      *  <li> The context structure astrom produced by this function is used by
25082      *     iauAtciq* and iauAticq*.
25083      *
25084      * </ol>
25085      *  Called:
25086      * <ul>
25087      *     <li>{@link #jauEpv00} Earth position and velocity
25088      *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25089      *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25090      *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25091      *     <li>{@link #jauApci} astrometry parameters, ICRS-CIRS
25092      *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25093      *
25094      * </ul>
25095      *@version  2013 October 9
25096      *
25097      *@since JSOFA release 20131202
25098      *
25099      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25100      */
25101     public static double jauApci13(double date1, double date2,
25102             Astrom astrom)
25103     {
25104         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3], r[][], s;
25105 
25106 
25107         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25108         jauEpv00(date1, date2, ehpv, ebpv);
25109 
25110         /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25111         r = jauPnm06a(date1, date2);
25112 
25113         /* Extract CIP X,Y. */
25114         CelestialIntermediatePole cip = jauBpn2xy(r);
25115 
25116         /* Obtain CIO locator s. */
25117         s = jauS06(date1, date2, cip.x, cip.y);
25118 
25119         /* Compute the star-independent astrometry parameters. */
25120         jauApci(date1, date2, ebpv, ehpv[0], cip.x, cip.y, s, astrom);
25121 
25122         /* Equation of the origins. */
25123         return jauEors(r, s);
25124 
25125         /* Finished. */
25126 
25127 
25128     }
25129 
25130     /**
25131      *  For a terrestrial observer, prepare star-independent astrometry
25132      *  parameters for transformations between ICRS and observed
25133      *  coordinates.  The caller supplies the Earth ephemeris, the Earth
25134      *  rotation information and the refraction constants as well as the
25135      *  site coordinates.
25136      *
25137      *<p>This function is derived from the International Astronomical Union's
25138      *  SOFA (Standards of Fundamental Astronomy) software collection.
25139      *
25140      *<p>Status:  support function.
25141      *
25142      *<!-- Given: -->
25143      *     @param date1   double        TDB as a 2-part...
25144      *     @param date2   double        ...Julian Date (Note 1)
25145      *     @param ebpv    double[2][3]  Earth barycentric PV (au, au/day, Note 2)
25146      *     @param ehp     double[3]     Earth heliocentric P (au, Note 2)
25147      *     @param x double        CIP X,Y (components of unit vector)
25148      *     @param y double        CIP X,Y (components of unit vector) 
25149      *     @param s       double        the CIO locator s (radians)
25150      *     @param theta   double        Earth rotation angle (radians)
25151      *     @param elong   double        longitude (radians, east +ve, Note 3)
25152      *     @param phi     double        latitude (geodetic, radians, Note 3)
25153      *     @param hm      double        height above ellipsoid (m, geodetic, Note 3)
25154      *     @param xp double        polar motion coordinates (radians, Note 4)
25155      *     @param yp double        polar motion coordinates (radians, Note 4) 
25156      *     @param sp      double        the TIO locator s' (radians, Note 4)
25157      *     @param refa    double        refraction constant A (radians, Note 5)
25158      *     @param refb    double        refraction constant B (radians, Note 5)
25159      *
25160      *<!-- Returned:-->
25161      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25162      *
25163      *<p>Notes:
25164      * <ol>
25165      *
25166      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25167      *     convenient way between the two arguments.  For example,
25168      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25169      *     others:
25170      *     <pre>
25171      *            date1          date2
25172      *
25173      *         2450123.7           0.0       (JD method)
25174      *         2451545.0       -1421.3       (J2000 method)
25175      *         2400000.5       50123.2       (MJD method)
25176      *         2450123.5           0.2       (date &amp; time method)
25177      *     </pre>
25178      *     <p>The JD method is the most natural and convenient to use in cases
25179      *     where the loss of several decimal digits of resolution is
25180      *     acceptable.  The J2000 method is best matched to the way the
25181      *     argument is handled internally and will deliver the optimum
25182      *     resolution.  The MJD method and the date &amp; time methods are both
25183      *     good compromises between resolution and convenience.  For most
25184      *     applications of this function the choice will not be at all
25185      *     critical.
25186      *
25187      *     <p>TT can be used instead of TDB without any significant impact on
25188      *     accuracy.
25189      *
25190      *  <li> The vectors eb, eh, and all the astrom vectors, are with respect
25191      *     to BCRS axes.
25192      *
25193      *  <li> The geographical coordinates are with respect to the WGS84
25194      *     reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN
25195      *     CONVENTION:  the longitude required by the present function is
25196      *     right-handed, i.e. east-positive, in accordance with geographical
25197      *     convention.
25198      *
25199      *  <li> xp and yp are the coordinates (in radians) of the Celestial
25200      *     Intermediate Pole with respect to the International Terrestrial
25201      *     Reference System (see IERS Conventions), measured along the
25202      *     meridians 0 and 90 deg west respectively.  sp is the TIO locator
25203      *     s', in radians, which positions the Terrestrial Intermediate
25204      *     Origin on the equator.  For many applications, xp, yp and
25205      *     (especially) sp can be set to zero.
25206      *
25207      *     <p>Internally, the polar motion is stored in a form rotated onto the
25208      *     local meridian.
25209      *
25210      *  <li> The refraction constants refa and refb are for use in a
25211      *     dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
25212      *     (i.e. refracted) zenith distance and dZ is the amount of
25213      *     refraction.
25214      *
25215      *  <li> It is advisable to take great care with units, as even unlikely
25216      *     values of the input parameters are accepted and processed in
25217      *     accordance with the models used.
25218      *
25219      *  <li> In cases where the caller does not wish to provide the Earth
25220      *     Ephemeris, the Earth rotation information and refraction
25221      *     constants, the function iauApco13 can be used instead of the
25222      *     present function.  This starts from UTC and weather readings etc.
25223      *     and computes suitable values using other SOFA functions.
25224      *
25225      *  <li> This is one of several functions that inserts into the astrom
25226      *     structure star-independent parameters needed for the chain of
25227      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25228      *
25229      *     <p>The various functions support different classes of observer and
25230      *     portions of the transformation chain:
25231      *     <pre>{@literal
25232      *          functions         observer        transformation
25233      *
25234      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25235      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25236      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25237      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25238      *       iauAper iauAper13    terrestrial     update Earth rotation
25239      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25240      *     }</pre>
25241      *     <p>Those with names ending in "13" use contemporary SOFA models to
25242      *     compute the various ephemerides.  The others accept ephemerides
25243      *     supplied by the caller.
25244      *
25245      *     <p>The transformation from ICRS to GCRS covers space motion,
25246      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25247      *     comprises frame bias and precession-nutation.  From CIRS to
25248      *     observed takes account of Earth rotation, polar motion, diurnal
25249      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25250      *     transformation), and atmospheric refraction.
25251      *
25252      *  <li> The context structure astrom produced by this function is used by
25253      *     iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25254      *
25255      * </ol>
25256      *  Called:
25257      * <ul>
25258      *     <li>{@link #jauAper} astrometry parameters: update ERA
25259      *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
25260      *     <li>{@link #jauPvtob} position/velocity of terrestrial station
25261      *     <li>{@link #jauTrxpv} product of transpose of r-matrix and pv-vector
25262      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25263      *     <li>{@link #jauCr} copy r-matrix
25264      *
25265      * </ul>
25266      *@version  2013 October 9
25267      *
25268      *@since JSOFA release 20131202
25269      *
25270      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25271      * @throws JSOFAInternalError 
25272      * @throws JSOFAIllegalParameter 
25273      */
25274     public static void jauApco(double date1, double date2,
25275             double ebpv[][], double ehp[],
25276             double x, double y, double s, double theta,
25277             double elong, double phi, double hm,
25278             double xp, double yp, double sp,
25279             double refa, double refb,
25280             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
25281     {
25282         double sl, cl, r[][], pvc[][], pv[][];
25283 
25284 
25285         /* Longitude with adjustment for TIO locator s'. */
25286         astrom.along = elong + sp;
25287 
25288         /* Polar motion, rotated onto the local meridian. */
25289         sl = sin(astrom.along);
25290         cl = cos(astrom.along);
25291         astrom.xpl = xp*cl - yp*sl;
25292         astrom.ypl = xp*sl + yp*cl;
25293 
25294         /* Functions of latitude. */
25295         astrom.sphi = sin(phi);
25296         astrom.cphi = cos(phi);
25297 
25298         /* Refraction constants. */
25299         astrom.refa = refa;
25300         astrom.refb = refb;
25301 
25302         /* Local Earth rotation angle. */
25303         jauAper(theta, astrom);
25304 
25305         /* Disable the (redundant) diurnal aberration step. */
25306         astrom.diurab = 0.0;
25307 
25308         /* CIO based BPN matrix. */
25309         r = jauC2ixys(x, y, s);
25310 
25311         /* Observer's geocentric position and velocity (m, m/s, CIRS). */
25312         pvc = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
25313 
25314         /* Rotate into GCRS. */
25315         pv = jauTrxpv(r, pvc);
25316 
25317         /* ICRS <-> GCRS parameters. */
25318         jauApcs(date1, date2, pv, ebpv, ehp, astrom);
25319 
25320         /* Store the CIO based BPN matrix. */
25321         jauCr(r, astrom.bpn );
25322 
25323         /* Finished. */
25324 
25325 
25326     }
25327 
25328     /**
25329      *  For a terrestrial observer, prepare star-independent astrometry
25330      *  parameters for transformations between ICRS and observed
25331      *  coordinates.  The caller supplies UTC, site coordinates, ambient air
25332      *  conditions and observing wavelength, and SOFA models are used to
25333      *  obtain the Earth ephemeris, CIP/CIO and refraction constants.
25334      *
25335      *  The parameters produced by this function are required in the
25336      *  parallax, light deflection, aberration, and bias-precession-nutation
25337      *  parts of the ICRS/CIRS transformations.
25338      *
25339      *<p>This function is derived from the International Astronomical Union's
25340      *  SOFA (Standards of Fundamental Astronomy) software collection.
25341      *
25342      *<p>Status:  support function.
25343      *
25344      *<!-- Given: -->
25345      *     @param utc1    double      UTC as a 2-part...
25346      *     @param utc2    double      ...quasi Julian Date (Notes 1,2)
25347      *     @param dut1    double      UT1-UTC (seconds, Note 3)
25348      *     @param elong   double      longitude (radians, east +ve, Note 4)
25349      *     @param phi     double      latitude (geodetic, radians, Note 4)
25350      *     @param hm      double      height above ellipsoid (m, geodetic, Notes 4,6)
25351      *     @param xp double      polar motion coordinates (radians, Note 5)
25352      *     @param yp double      polar motion coordinates (radians, Note 5) 
25353      *     @param phpa    double      pressure at the observer (hPa = mB, Note 6)
25354      *     @param tc      double      ambient temperature at the observer (deg C)
25355      *     @param rh      double      relative humidity at the observer (range 0-1)
25356      *     @param wl      double      wavelength (micrometers, Note 7)
25357      *
25358      *<!-- Returned:-->
25359      *     @param astrom     <b>Returned</b> star-independent astrometry parameters:
25360      *         
25361      *     
25362      *     @return       double      <b>Returned</b> equation of the origins (ERA-GST)
25363      *
25364      *  @throws JSOFAInternalError
25365      *  @throws JSOFAIllegalParameter
25366      *             int         status:   <b>Returned</b> +1 = dubious year (Note 2)
25367      *                                 0  =   <b>Returned</b> OK
25368      *                                -1  =   <b>Returned</b> unacceptable date
25369      *
25370      *<p>Notes:
25371      * <ol>
25372      *
25373      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
25374      *      convenient way between the two arguments, for example where utc1
25375      *      is the Julian Day Number and utc2 is the fraction of a day.
25376      *
25377      *      <p>However, JD cannot unambiguously represent UTC during a leap
25378      *      second unless special measures are taken.  The convention in the
25379      *      present function is that the JD day represents UTC days whether
25380      *      the length is 86399, 86400 or 86401 SI seconds.
25381      *
25382      *      <p>Applications should use the function iauDtf2d to convert from
25383      *      calendar date and time of day into 2-part quasi Julian Date, as
25384      *      it implements the leap-second-ambiguity convention just
25385      *      described.
25386      *
25387      *  <li> The warning status "dubious year" flags UTCs that predate the
25388      *      introduction of the time scale or that are too far in the
25389      *      future to be trusted.  See iauDat for further details.
25390      *
25391      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
25392      *      one second at the end of each positive UTC leap second,
25393      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
25394      *      practice is under review, and in the future UT1-UTC may grow
25395      *      essentially without limit.
25396      *
25397      *  <li> The geographical coordinates are with respect to the WGS84
25398      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
25399      *      longitude required by the present function is east-positive
25400      *      (i.e. right-handed), in accordance with geographical convention.
25401      *
25402      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
25403      *      values are the coordinates (in radians) of the Celestial
25404      *      Intermediate Pole with respect to the International Terrestrial
25405      *      Reference System (see IERS Conventions 2003), measured along the
25406      *      meridians 0 and 90 deg west respectively.  For many
25407      *      applications, xp and yp can be set to zero.
25408      *
25409      *      <p>Internally, the polar motion is stored in a form rotated onto
25410      *      the local meridian.
25411      *
25412      *  <li> If hm, the height above the ellipsoid of the observing station
25413      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
25414      *      available, an adequate estimate of hm can be obtained from the
25415      *      expression
25416      *
25417      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
25418      *
25419      *      <p>where tsl is the approximate sea-level air temperature in K
25420      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
25421      *      52).  Similarly, if the pressure phpa is not known, it can be
25422      *      estimated from the height of the observing station, hm, as
25423      *      follows:
25424      *
25425      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
25426      *
25427      *      <p>Note, however, that the refraction is nearly proportional to
25428      *      the pressure and that an accurate phpa value is important for
25429      *      precise work.
25430      *
25431      *  <li> The argument wl specifies the observing wavelength in
25432      *      micrometers.  The transition from optical to radio is assumed to
25433      *      occur at 100 micrometers (about 3000 GHz).
25434      *
25435      *  <li> It is advisable to take great care with units, as even unlikely
25436      *      values of the input parameters are accepted and processed in
25437      *      accordance with the models used.
25438      *
25439      *  <li> In cases where the caller wishes to supply his own Earth
25440      *      ephemeris, Earth rotation information and refraction constants,
25441      *      the function iauApco can be used instead of the present function.
25442      *
25443      *  <li> This is one of several functions that inserts into the astrom
25444      *      structure star-independent parameters needed for the chain of
25445      *      astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25446      *
25447      *      <p>The various functions support different classes of observer and
25448      *      portions of the transformation chain:
25449      *      <pre>{@literal
25450      *          functions         observer        transformation
25451      *
25452      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25453      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25454      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25455      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25456      *       iauAper iauAper13    terrestrial     update Earth rotation
25457      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25458      *      }</pre>
25459      *      <p>Those with names ending in "13" use contemporary SOFA models to
25460      *      compute the various ephemerides.  The others accept ephemerides
25461      *      supplied by the caller.
25462      *
25463      *      <p>The transformation from ICRS to GCRS covers space motion,
25464      *      parallax, light deflection, and aberration.  From GCRS to CIRS
25465      *      comprises frame bias and precession-nutation.  From CIRS to
25466      *      observed takes account of Earth rotation, polar motion, diurnal
25467      *      aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25468      *      transformation), and atmospheric refraction.
25469      *
25470      *  <li> The context structure astrom produced by this function is used
25471      *      by iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25472      *
25473      * </ol>
25474      *  Called:
25475      * <ul>
25476      *     <li>{@link #jauUtctai} UTC to TAI
25477      *     <li>{@link #jauTaitt} TAI to TT
25478      *     <li>{@link #jauUtcut1} UTC to UT1
25479      *     <li>{@link #jauEpv00} Earth position and velocity
25480      *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25481      *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25482      *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25483      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
25484      *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
25485      *     <li>{@link #jauRefco} refraction constants for given ambient conditions
25486      *     <li>{@link #jauApco} astrometry parameters, ICRS-observed
25487      *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25488      *
25489      * </ul>
25490      *@version  2013 December 5
25491      *
25492      *@since JSOFA release 20131202
25493      *
25494      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25495      * @throws JSOFAInternalError 
25496      * @throws JSOFAIllegalParameter 
25497      */
25498     public static double jauApco13(double utc1, double utc2, double dut1,
25499             double elong, double phi, double hm, double xp, double yp,
25500             double phpa, double tc, double rh, double wl,
25501             Astrom astrom ) throws JSOFAIllegalParameter, JSOFAInternalError
25502     {
25503         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3],
25504         r[][], s, theta, sp;
25505         double eo;
25506 
25507 
25508         /* UTC to other time scales. */
25509         JulianDate tai = jauUtctai(utc1, utc2);
25510         JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
25511         JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
25512 
25513         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25514         jauEpv00(tt.djm0, tt.djm1, ehpv, ebpv);
25515 
25516         /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25517         r = jauPnm06a(tt.djm0, tt.djm1);
25518 
25519         /* Extract CIP X,Y. */
25520         CelestialIntermediatePole cip = jauBpn2xy(r);
25521 
25522         /* Obtain CIO locator s. */
25523         s = jauS06(tt.djm0, tt.djm1, cip.x, cip.y);
25524 
25525         /* Earth rotation angle. */
25526         theta = jauEra00(ut1.djm0, ut1.djm1);
25527 
25528         /* TIO locator s'. */
25529         sp = jauSp00(tt.djm0, tt.djm1);
25530 
25531         /* Refraction constants A and B. */
25532         RefCos ref = jauRefco(phpa, tc, rh, wl);
25533 
25534         /* Compute the star-independent astrometry parameters. */
25535         jauApco(tt.djm0, tt.djm1, ebpv, ehpv[0], cip.x, cip.y, s, theta,
25536                 elong, phi, hm, xp, yp, sp, ref.a, ref.b, astrom);
25537 
25538         /* Equation of the origins. */
25539         eo = jauEors(r, s);
25540 
25541         return eo;
25542 
25543         /* Finished. */
25544 
25545 
25546     }
25547 
25548     /**
25549      *  For an observer whose geocentric position and velocity are known,
25550      *  prepare star-independent astrometry parameters for transformations
25551      *  between ICRS and GCRS.  The Earth ephemeris is supplied by the
25552      *  caller.
25553      *
25554      *  The parameters produced by this function are required in the space
25555      *  motion, parallax, light deflection and aberration parts of the
25556      *  astrometric transformation chain.
25557      *
25558      *<p>This function is derived from the International Astronomical Union's
25559      *  SOFA (Standards of Fundamental Astronomy) software collection.
25560      *
25561      *<p>Status:  support function.
25562      *
25563      *<!-- Given: -->
25564      *     @param date1   double        TDB as a 2-part...
25565      *     @param date2   double        ...Julian Date (Note 1)
25566      *     @param pv      double[2][3]  observer's geocentric pos/vel (m, m/s)
25567      *     @param ebpv    double[2][3]  Earth barycentric PV (au, au/day)
25568      *     @param ehp     double[3]     Earth heliocentric P (au)
25569      *
25570      *<!-- Returned:-->
25571      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25572 
25573      *<p>Notes:
25574      * <ol>
25575      *
25576      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25577      *     convenient way between the two arguments.  For example,
25578      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25579      *     others:
25580      *     <pre>
25581      *         date1          date2
25582      *
25583      *         2450123.7           0.0       (JD method)
25584      *         2451545.0       -1421.3       (J2000 method)
25585      *         2400000.5       50123.2       (MJD method)
25586      *         2450123.5           0.2       (date &amp; time method)
25587      *     </pre>
25588      *     <p>The JD method is the most natural and convenient to use in cases
25589      *     where the loss of several decimal digits of resolution is
25590      *     acceptable.  The J2000 method is best matched to the way the
25591      *     argument is handled internally and will deliver the optimum
25592      *     resolution.  The MJD method and the date &amp; time methods are both
25593      *     good compromises between resolution and convenience.  For most
25594      *     applications of this function the choice will not be at all
25595      *     critical.
25596      *
25597      *     <p>TT can be used instead of TDB without any significant impact on
25598      *     accuracy.
25599      *
25600      *  <li> All the vectors are with respect to BCRS axes.
25601      *
25602      *  <li> Providing separate arguments for (i) the observer's geocentric
25603      *     position and velocity and (ii) the Earth ephemeris is done for
25604      *     convenience in the geocentric, terrestrial and Earth orbit cases.
25605      *     For deep space applications it maybe more convenient to specify
25606      *     zero geocentric position and velocity and to supply the
25607      *     observer's position and velocity information directly instead of
25608      *     with respect to the Earth.  However, note the different units:
25609      *     m and m/s for the geocentric vectors, au and au/day for the
25610      *     heliocentric and barycentric vectors.
25611      *
25612      *  <li> In cases where the caller does not wish to provide the Earth
25613      *     ephemeris, the function iauApcs13 can be used instead of the
25614      *     present function.  This computes the Earth ephemeris using the
25615      *     SOFA function iauEpv00.
25616      *
25617      *  <li> This is one of several functions that inserts into the astrom
25618      *     structure star-independent parameters needed for the chain of
25619      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25620      *
25621      *     <p>The various functions support different classes of observer and
25622      *     portions of the transformation chain:
25623      *
25624      *     <pre>{@literal
25625      *          functions         observer        transformation
25626      *
25627      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25628      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25629      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25630      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25631      *       iauAper iauAper13    terrestrial     update Earth rotation
25632      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25633      *     }</pre>
25634      *     <p>Those with names ending in "13" use contemporary SOFA models to
25635      *     compute the various ephemerides.  The others accept ephemerides
25636      *     supplied by the caller.
25637      *
25638      *     <p>The transformation from ICRS to GCRS covers space motion,
25639      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25640      *     comprises frame bias and precession-nutation.  From CIRS to
25641      *     observed takes account of Earth rotation, polar motion, diurnal
25642      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25643      *     transformation), and atmospheric refraction.
25644      *
25645      *  <li> The context structure astrom produced by this function is used by
25646      *     iauAtciq* and iauAticq*.
25647      *
25648      * </ol>
25649      *  Called:
25650      * <ul>
25651      *     <li>{@link #jauCp} copy p-vector
25652      *     <li>{@link #jauPm} modulus of p-vector
25653      *     <li>{@link #jauPn} decompose p-vector into modulus and direction
25654      *     <li>{@link #jauIr} initialize r-matrix to identity
25655      *
25656      * </ul>
25657      *@version  2013 October 9
25658      *
25659      *@since JSOFA release 20131202
25660      *
25661      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25662      */
25663     public static void jauApcs(double date1, double date2, double pv[][],
25664             double ebpv[][], double ehp[],
25665             Astrom astrom)
25666     {
25667         /* au/d to m/s */
25668         final double AUDMS = DAU/DAYSEC;
25669 
25670         /* Light time for 1 au (day) */
25671         final double CR = AULT/DAYSEC;
25672 
25673         int i;
25674         double dp, dv, pb[] = new double[3], vb[] = new double[3], ph[] = new double[3], v2, w;
25675 
25676 
25677         /* Time since reference epoch, years (for proper motion calculation). */
25678         astrom.pmt = ( (date1 - DJ00) + date2 ) / DJY;
25679 
25680         /* Adjust Earth ephemeris to observer. */
25681         for (i = 0; i < 3; i++) {
25682             dp = pv[0][i] / DAU;
25683             dv = pv[1][i] / AUDMS;
25684             pb[i] = ebpv[0][i] + dp;
25685             vb[i] = ebpv[1][i] + dv;
25686             ph[i] = ehp[i] + dp;
25687         }
25688 
25689         /* Barycentric position of observer (au). */
25690         jauCp(pb, astrom.eb);
25691 
25692         /* Heliocentric direction and distance (unit vector and au). */
25693         NormalizedVector nv = jauPn(ph);
25694         
25695         astrom.em = nv.r;
25696         astrom.eh = nv.u;
25697 
25698         /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */
25699         v2 = 0.0;
25700         for (i = 0; i < 3; i++) {
25701             w = vb[i] * CR;
25702             astrom.v[i] = w;
25703             v2 += w*w;
25704         }
25705         astrom.bm1 = sqrt(1.0 - v2);
25706 
25707         /* Reset the NPB matrix. */
25708         jauIr(astrom.bpn);
25709 
25710         /* Finished. */
25711 
25712 
25713     }
25714 
25715     /**
25716      *  For an observer whose geocentric position and velocity are known,
25717      *  prepare star-independent astrometry parameters for transformations
25718      *  between ICRS and GCRS.  The Earth ephemeris is from SOFA models.
25719      *
25720      *  The parameters produced by this function are required in the space
25721      *  motion, parallax, light deflection and aberration parts of the
25722      *  astrometric transformation chain.
25723      *
25724      *<p>This function is derived from the International Astronomical Union's
25725      *  SOFA (Standards of Fundamental Astronomy) software collection.
25726      *
25727      *<p>Status:  support function.
25728      *
25729      *<!-- Given: -->
25730      *     @param date1   double        TDB as a 2-part...
25731      *     @param date2   double        ...Julian Date (Note 1)
25732      *     @param pv      double[2][3]  observer's geocentric pos/vel (Note 3)
25733      *
25734      *<!-- Returned:-->
25735      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25736      *
25737      *<p>Notes:
25738      * <ol>
25739      *
25740      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25741      *     convenient way between the two arguments.  For example,
25742      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25743      *     others:
25744      *     <pre>
25745      *           date1          date2
25746      *
25747      *         2450123.7           0.0       (JD method)
25748      *         2451545.0       -1421.3       (J2000 method)
25749      *         2400000.5       50123.2       (MJD method)
25750      *         2450123.5           0.2       (date &amp; time method)
25751      *     </pre>
25752      *     <p>The JD method is the most natural and convenient to use in cases
25753      *     where the loss of several decimal digits of resolution is
25754      *     acceptable.  The J2000 method is best matched to the way the
25755      *     argument is handled internally and will deliver the optimum
25756      *     resolution.  The MJD method and the date &amp; time methods are both
25757      *     good compromises between resolution and convenience.  For most
25758      *     applications of this function the choice will not be at all
25759      *     critical.
25760      *
25761      *     <p>TT can be used instead of TDB without any significant impact on
25762      *     accuracy.
25763      *
25764      *  <li> All the vectors are with respect to BCRS axes.
25765      *
25766      *  <li> The observer's position and velocity pv are geocentric but with
25767      *     respect to BCRS axes, and in units of m and m/s.  No assumptions
25768      *     are made about proximity to the Earth, and the function can be
25769      *     used for deep space applications as well as Earth orbit and
25770      *     terrestrial.
25771      *
25772      *  <li> In cases where the caller wishes to supply his own Earth
25773      *     ephemeris, the function iauApcs can be used instead of the present
25774      *     function.
25775      *
25776      *  <li> This is one of several functions that inserts into the astrom
25777      *     structure star-independent parameters needed for the chain of
25778      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25779      *
25780      *     <p>The various functions support different classes of observer and
25781      *     portions of the transformation chain:
25782      *     <pre>{@literal
25783      *          functions         observer        transformation
25784      *
25785      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25786      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25787      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25788      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25789      *       iauAper iauAper13    terrestrial     update Earth rotation
25790      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25791      *     }</pre>
25792      *     <p>Those with names ending in "13" use contemporary SOFA models to
25793      *     compute the various ephemerides.  The others accept ephemerides
25794      *     supplied by the caller.
25795      *
25796      *     <p>The transformation from ICRS to GCRS covers space motion,
25797      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25798      *     comprises frame bias and precession-nutation.  From CIRS to
25799      *     observed takes account of Earth rotation, polar motion, diurnal
25800      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25801      *     transformation), and atmospheric refraction.
25802      *
25803      *  <li> The context structure astrom produced by this function is used by
25804      *     iauAtciq* and iauAticq*.
25805      *
25806      * </ol>
25807      *  Called:
25808      * <ul>
25809      *     <li>{@link #jauEpv00} Earth position and velocity
25810      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25811      *
25812      * </ul>
25813      *@version  2013 October 9
25814      *
25815      *@since JSOFA release 20131202
25816      *
25817      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25818      */
25819     public static void jauApcs13(double date1, double date2, double pv[][],
25820             Astrom astrom)
25821     {
25822         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
25823 
25824 
25825         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25826         jauEpv00(date1, date2, ehpv, ebpv);
25827 
25828         /* Compute the star-independent astrometry parameters. */
25829         jauApcs(date1, date2, pv, ebpv, ehpv[0], astrom);
25830 
25831         /* Finished. */
25832 
25833 
25834     }
25835 
25836     /**
25837      *  In the star-independent astrometry parameters, update only the
25838      *  Earth rotation angle, supplied by the caller explicitly.
25839      *
25840      *<p>This function is derived from the International Astronomical Union's
25841      *  SOFA (Standards of Fundamental Astronomy) software collection.
25842      *
25843      *<p>Status:  support function.
25844      *
25845      *<!-- Given: -->
25846      *     @param theta    double       Earth rotation angle (radians, Note 2)
25847      *     @param astrom  Astrom    star-independent astrometry parameters:{@code
25848      *          pmt     double        not used
25849      *          eb      double[3]     not used
25850      *          eh      double[3]     not used
25851      *          em      double        not used
25852      *          v       double[3]     not used
25853      *          bm1     double        not used
25854      *          bpn     double[3][3]  not used
25855      *          along   double        longitude + s' (radians)
25856      *          xpl     double        not used
25857      *          ypl     double        not used
25858      *          sphi    double        not used
25859      *          cphi    double        not used
25860      *          diurab  double        not used
25861      *          eral    double        not used
25862      *          refa    double        not used
25863      *          refb    double        not used}
25864      *
25865      *<!-- Returned:-->
25866      *     astrom       <b>Returned</b> star-independent astrometry parameters:
25867     *
25868      *<p>Notes:
25869      * <ol>
25870      *
25871      *  <li> This function exists to enable sidereal-tracking applications to
25872      *     avoid wasteful recomputation of the bulk of the astrometry
25873      *     parameters:  only the Earth rotation is updated.
25874      *
25875      *  <li> For targets expressed as equinox based positions, such as
25876      *     classical geocentric apparent (RA,Dec), the supplied theta can be
25877      *     Greenwich apparent sidereal time rather than Earth rotation
25878      *     angle.
25879      *
25880      *  <li> The function iauAper13 can be used instead of the present
25881      *     function, and starts from UT1 rather than ERA itself.
25882      *
25883      *  <li> This is one of several functions that inserts into the astrom
25884      *     structure star-independent parameters needed for the chain of
25885      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25886      *
25887      *     <p>The various functions support different classes of observer and
25888      *     portions of the transformation chain:
25889      *     <pre>{@literal
25890      *          functions         observer        transformation
25891      *
25892      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25893      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25894      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25895      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25896      *       iauAper iauAper13    terrestrial     update Earth rotation
25897      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25898      *     }</pre>
25899      *     <p>Those with names ending in "13" use contemporary SOFA models to
25900      *     compute the various ephemerides.  The others accept ephemerides
25901      *     supplied by the caller.
25902      *
25903      *     <p>The transformation from ICRS to GCRS covers space motion,
25904      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25905      *     comprises frame bias and precession-nutation.  From CIRS to
25906      *     observed takes account of Earth rotation, polar motion, diurnal
25907      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25908      *     transformation), and atmospheric refraction.
25909      *
25910      * </ol>
25911      *@version  2013 September 25
25912      *
25913      *@since JSOFA release 20131202
25914      *
25915      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25916      */
25917     public static void jauAper(double theta, Astrom astrom)
25918     {
25919         astrom.eral = theta + astrom.along;
25920 
25921         /* Finished. */
25922 
25923 
25924     }
25925 
25926     /**
25927      *  In the star-independent astrometry parameters, update only the
25928      *  Earth rotation angle.  The caller provides UT1, (n.b. not UTC).
25929      *
25930      *<p>This function is derived from the International Astronomical Union's
25931      *  SOFA (Standards of Fundamental Astronomy) software collection.
25932      *
25933      *<p>Status:  support function.
25934      *
25935      *<!-- Given: -->
25936      *     @param ut11     double       UT1 as a 2-part...
25937      *     @param ut12     double       ...Julian Date (Note 1)
25938      *     @param astrom      star-independent astrometry parameters:
25939      *                    pmt     double        not used
25940      *                    eb      double[3]     not used
25941      *                    eh      double[3]     not used
25942      *                    em      double        not used
25943      *                    v       double[3]     not used
25944      *                    bm1     double        not used
25945      *                    bpn     double[3][3]  not used
25946      *                    along   double        longitude + s' (radians)
25947      *                    xpl     double        not used
25948      *                    ypl     double        not used
25949      *                    sphi    double        not used
25950      *                    cphi    double        not used
25951      *                    diurab  double        not used
25952      *                    eral    double        not used
25953      *                    refa    double        not used
25954      *                    refb    double        not used
25955      *
25956      *<!-- Returned:-->
25957      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25958      *
25959      *<p>Notes:
25960      * <ol>
25961      *
25962      *  <li> The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date,
25963      *     apportioned in any convenient way between the arguments ut11 and
25964      *     ut12.  For example, JD(UT1)=2450123.7 could be expressed in any
25965      *     of these ways, among others:
25966      *
25967      *            <p>ut11           ut12
25968      *
25969      *         2450123.7           0.0       (JD method)
25970      *         2451545.0       -1421.3       (J2000 method)
25971      *         2400000.5       50123.2       (MJD method)
25972      *         2450123.5           0.2       (date &amp; time method)
25973      *
25974      *     <p>The JD method is the most natural and convenient to use in cases
25975      *     where the loss of several decimal digits of resolution is
25976      *     acceptable.  The J2000 and MJD methods are good compromises
25977      *     between resolution and convenience.  The date &amp; time method is
25978      *     best matched to the algorithm used:  maximum precision is
25979      *     delivered when the ut11 argument is for 0hrs UT1 on the day in
25980      *     question and the ut12 argument lies in the range 0 to 1, or vice
25981      *     versa.
25982      *
25983      *  <li> If the caller wishes to provide the Earth rotation angle itself,
25984      *     the function iauAper can be used instead.  One use of this
25985      *     technique is to substitute Greenwich apparent sidereal time and
25986      *     thereby to support equinox based transformations directly.
25987      *
25988      *  <li> This is one of several functions that inserts into the astrom
25989      *     structure star-independent parameters needed for the chain of
25990      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25991      *
25992      *     <p>The various functions support different classes of observer and
25993      *     portions of the transformation chain:
25994      *     <pre>{@literal
25995      *          functions         observer        transformation
25996      *
25997      *       <p>iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25998      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25999      *       iauApco iauApco13    terrestrial     ICRS <-> observed
26000      *       iauApcs iauApcs13    space           ICRS <-> GCRS
26001      *       iauAper iauAper13    terrestrial     update Earth rotation
26002      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26003      *     }</pre>
26004      *     <p>Those with names ending in "13" use contemporary SOFA models to
26005      *     compute the various ephemerides.  The others accept ephemerides
26006      *     supplied by the caller.
26007      *
26008      *     <p>The transformation from ICRS to GCRS covers space motion,
26009      *     parallax, light deflection, and aberration.  From GCRS to CIRS
26010      *     comprises frame bias and precession-nutation.  From CIRS to
26011      *     observed takes account of Earth rotation, polar motion, diurnal
26012      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26013      *     transformation), and atmospheric refraction.
26014      *
26015      * </ol>
26016      *  Called:
26017      * <ul>
26018      *     <li>{@link #jauAper} astrometry parameters: update ERA
26019      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26020      *
26021      * </ul>
26022      *@version  2013 September 25
26023      *
26024      *@since JSOFA release 20131202
26025      *
26026      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26027      */
26028     public static void jauAper13(double ut11, double ut12, Astrom astrom)
26029     {
26030         jauAper(jauEra00(ut11,ut12), astrom);
26031 
26032         /* Finished. */
26033 
26034 
26035     }
26036 
26037     /**
26038      *  For a terrestrial observer, prepare star-independent astrometry
26039      *  parameters for transformations between CIRS and observed
26040      *  coordinates.  The caller supplies the Earth orientation information
26041      *  and the refraction constants as well as the site coordinates.
26042      *
26043      *<p>This function is derived from the International Astronomical Union's
26044      *  SOFA (Standards of Fundamental Astronomy) software collection.
26045      *
26046      *<p>Status:  support function.
26047      *
26048      *<!-- Given: -->
26049      *     @param sp      double       the TIO locator s' (radians, Note 1)
26050      *     @param theta   double       Earth rotation angle (radians)
26051      *     @param elong   double       longitude (radians, east +ve, Note 2)
26052      *     @param phi     double       geodetic latitude (radians, Note 2)
26053      *     @param hm      double       height above ellipsoid (m, geodetic Note 2)
26054      *     @param xp double       polar motion coordinates (radians, Note 3)
26055      *     @param yp double       polar motion coordinates (radians, Note 3) 
26056      *     @param refa    double       refraction constant A (radians, Note 4)
26057      *     @param refb    double       refraction constant B (radians, Note 4)
26058      *
26059      *<!-- Returned:-->
26060      *     @param astrom  {@link Astrom}    <b>Returned</b> star-independent astrometry parameters:
26061      *     
26062      *<p>Notes:
26063      * <ol>
26064      *
26065      *  <li> sp, the TIO locator s', is a tiny quantity needed only by the
26066      *     most precise applications.  It can either be set to zero or
26067      *     predicted using the SOFA function iauSp00.
26068      *
26069      *  <li> The geographical coordinates are with respect to the WGS84
26070      *     reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26071      *     longitude required by the present function is east-positive
26072      *     (i.e. right-handed), in accordance with geographical convention.
26073      *
26074      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26075      *     values are the coordinates (in radians) of the Celestial
26076      *     Intermediate Pole with respect to the International Terrestrial
26077      *     Reference System (see IERS Conventions 2003), measured along the
26078      *     meridians 0 and 90 deg west respectively.  For many applications,
26079      *     xp and yp can be set to zero.
26080      *
26081      *     <p>Internally, the polar motion is stored in a form rotated onto the
26082      *     local meridian.
26083      *
26084      *  <li> The refraction constants refa and refb are for use in a
26085      *     dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
26086      *     (i.e. refracted) zenith distance and dZ is the amount of
26087      *     refraction.
26088      *
26089      *  <li> It is advisable to take great care with units, as even unlikely
26090      *     values of the input parameters are accepted and processed in
26091      *     accordance with the models used.
26092      *
26093      *  <li> In cases where the caller does not wish to provide the Earth
26094      *     rotation information and refraction constants, the function
26095      *     iauApio13 can be used instead of the present function.  This
26096      *     starts from UTC and weather readings etc. and computes suitable
26097      *     values using other SOFA functions.
26098      *
26099      *  <li> This is one of several functions that inserts into the astrom
26100      *     structure star-independent parameters needed for the chain of
26101      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
26102      *
26103      *     <p>The various functions support different classes of observer and
26104      *     portions of the transformation chain:
26105      *<pre>{@literal
26106      *          functions         observer        transformation
26107      *
26108      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
26109      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
26110      *       iauApco iauApco13    terrestrial     ICRS <-> observed
26111      *       iauApcs iauApcs13    space           ICRS <-> GCRS
26112      *       iauAper iauAper13    terrestrial     update Earth rotation
26113      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26114      *}</pre>
26115      *     <p>Those with names ending in "13" use contemporary SOFA models to
26116      *     compute the various ephemerides.  The others accept ephemerides
26117      *     supplied by the caller.
26118      *
26119      *     <p>The transformation from ICRS to GCRS covers space motion,
26120      *     parallax, light deflection, and aberration.  From GCRS to CIRS
26121      *     comprises frame bias and precession-nutation.  From CIRS to
26122      *     observed takes account of Earth rotation, polar motion, diurnal
26123      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26124      *     transformation), and atmospheric refraction.
26125      *
26126      *  <li> The context structure astrom produced by this function is used by
26127      *     iauAtioq and iauAtoiq.
26128      *
26129      * </ol>
26130      *  Called:
26131      * <ul>
26132      *     <li>{@link #jauPvtob} position/velocity of terrestrial station
26133      *     <li>{@link #jauAper} astrometry parameters: update ERA
26134      *
26135      * </ul>
26136      *@version  2013 October 9
26137      *
26138      *@since JSOFA release 20131202
26139      *
26140      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26141      * @throws JSOFAInternalError 
26142      * @throws JSOFAIllegalParameter 
26143      */
26144     public static void jauApio(double sp, double theta,
26145             double elong, double phi, double hm, double xp, double yp,
26146             double refa, double refb,
26147             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26148     {
26149         double sl, cl, pv[][];
26150 
26151 
26152         /* Longitude with adjustment for TIO locator s'. */
26153         astrom.along = elong + sp;
26154 
26155         /* Polar motion, rotated onto the local meridian. */
26156         sl = sin(astrom.along);
26157         cl = cos(astrom.along);
26158         astrom.xpl = xp*cl - yp*sl;
26159         astrom.ypl = xp*sl + yp*cl;
26160 
26161         /* Functions of latitude. */
26162         astrom.sphi = sin(phi);
26163         astrom.cphi = cos(phi);
26164 
26165         /* Observer's geocentric position and velocity (m, m/s, CIRS). */
26166         pv = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
26167 
26168         /* Magnitude of diurnal aberration vector. */
26169         astrom.diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / CMPS;
26170 
26171         /* Refraction constants. */
26172         astrom.refa = refa;
26173         astrom.refb = refb;
26174 
26175         /* Local Earth rotation angle. */
26176         jauAper(theta, astrom);
26177 
26178         /* Finished. */
26179 
26180 
26181     }
26182 
26183     /**
26184      *  For a terrestrial observer, prepare star-independent astrometry
26185      *  parameters for transformations between CIRS and observed
26186      *  coordinates.  The caller supplies UTC, site coordinates, ambient air
26187      *  conditions and observing wavelength.
26188      *
26189      *<p>This function is derived from the International Astronomical Union's
26190      *  SOFA (Standards of Fundamental Astronomy) software collection.
26191      *
26192      *<p>Status:  support function.
26193      *
26194      *<!-- Given: -->
26195      *     @param utc1    double       UTC as a 2-part...
26196      *     @param utc2    double       ...quasi Julian Date (Notes 1,2)
26197      *     @param dut1    double       UT1-UTC (seconds)
26198      *     @param elong   double       longitude (radians, east +ve, Note 3)
26199      *     @param phi     double       geodetic latitude (radians, Note 3)
26200      *     @param hm      double       height above ellipsoid (m, geodetic Notes 4,6)
26201      *     @param xp double       polar motion coordinates (radians, Note 5)
26202      *     @param yp double       polar motion coordinates (radians, Note 5) 
26203      *     @param phpa    double       pressure at the observer (hPa = mB, Note 6)
26204      *     @param tc      double       ambient temperature at the observer (deg C)
26205      *     @param rh      double       relative humidity at the observer (range 0-1)
26206      *     @param wl      double       wavelength (micrometers, Note 7)
26207      *
26208      *<!-- Returned:-->
26209      *     @param astrom      <b>Returned</b> star-independent astrometry parameters:
26210      *     @throws JSOFAInternalError
26211      *     @throws JSOFAIllegalParameter
26212      *                   
26213      *             int          status:   <b>Returned</b> +1 = dubious year (Note 2)
26214      *                                  0  =   <b>Returned</b> OK
26215      *                                 -1  =   <b>Returned</b> unacceptable date
26216      *
26217      *<p>Notes:
26218      * <ol>
26219      *
26220      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26221      *      convenient way between the two arguments, for example where utc1
26222      *      is the Julian Day Number and utc2 is the fraction of a day.
26223      *
26224      *      <p>However, JD cannot unambiguously represent UTC during a leap
26225      *      second unless special measures are taken.  The convention in the
26226      *      present function is that the JD day represents UTC days whether
26227      *      the length is 86399, 86400 or 86401 SI seconds.
26228      *
26229      *      <p>Applications should use the function iauDtf2d to convert from
26230      *      calendar date and time of day into 2-part quasi Julian Date, as
26231      *      it implements the leap-second-ambiguity convention just
26232      *      described.
26233      *
26234      *  <li> The warning status "dubious year" flags UTCs that predate the
26235      *      introduction of the time scale or that are too far in the future
26236      *      to be trusted.  See iauDat for further details.
26237      *
26238      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
26239      *      one second at the end of each positive UTC leap second,
26240      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
26241      *      practice is under review, and in the future UT1-UTC may grow
26242      *      essentially without limit.
26243      *
26244      *  <li> The geographical coordinates are with respect to the WGS84
26245      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26246      *      longitude required by the present function is east-positive
26247      *      (i.e. right-handed), in accordance with geographical convention.
26248      *
26249      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26250      *      values are the coordinates (in radians) of the Celestial
26251      *      Intermediate Pole with respect to the International Terrestrial
26252      *      Reference System (see IERS Conventions 2003), measured along the
26253      *      meridians 0 and 90 deg west respectively.  For many applications,
26254      *      xp and yp can be set to zero.
26255      *
26256      *      <p>Internally, the polar motion is stored in a form rotated onto
26257      *      the local meridian.
26258      *
26259      *  <li> If hm, the height above the ellipsoid of the observing station
26260      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
26261      *      available, an adequate estimate of hm can be obtained from the
26262      *      expression
26263      *
26264      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26265      *
26266      *      <p>where tsl is the approximate sea-level air temperature in K
26267      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26268      *      52).  Similarly, if the pressure phpa is not known, it can be
26269      *      estimated from the height of the observing station, hm, as
26270      *      follows:
26271      *
26272      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26273      *
26274      *      <p>Note, however, that the refraction is nearly proportional to the
26275      *      pressure and that an accurate phpa value is important for
26276      *      precise work.
26277      *
26278      *  <li> The argument wl specifies the observing wavelength in
26279      *      micrometers.  The transition from optical to radio is assumed to
26280      *      occur at 100 micrometers (about 3000 GHz).
26281      *
26282      *  <li> It is advisable to take great care with units, as even unlikely
26283      *      values of the input parameters are accepted and processed in
26284      *      accordance with the models used.
26285      *
26286      *  <li> In cases where the caller wishes to supply his own Earth
26287      *      rotation information and refraction constants, the function
26288      *      iauApc can be used instead of the present function.
26289      *
26290      *  <li> This is one of several functions that inserts into the astrom
26291      *      structure star-independent parameters needed for the chain of
26292      *      astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
26293      *
26294      *      <p>The various functions support different classes of observer and
26295      *      portions of the transformation chain:
26296      *      <pre>{@literal
26297      *          functions         observer        transformation
26298      *
26299      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
26300      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
26301      *       iauApco iauApco13    terrestrial     ICRS <-> observed
26302      *       iauApcs iauApcs13    space           ICRS <-> GCRS
26303      *       iauAper iauAper13    terrestrial     update Earth rotation
26304      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26305      *      }</pre>
26306      *      <p>Those with names ending in "13" use contemporary SOFA models to
26307      *      compute the various ephemerides.  The others accept ephemerides
26308      *      supplied by the caller.
26309      *
26310      *      <p>The transformation from ICRS to GCRS covers space motion,
26311      *      parallax, light deflection, and aberration.  From GCRS to CIRS
26312      *      comprises frame bias and precession-nutation.  From CIRS to
26313      *      observed takes account of Earth rotation, polar motion, diurnal
26314      *      aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26315      *      transformation), and atmospheric refraction.
26316      *
26317      *  <li> The context structure astrom produced by this function is used
26318      *      by iauAtioq and iauAtoiq.
26319      *
26320      * </ol>
26321      *  Called:
26322      * <ul>
26323      *     <li>{@link #jauUtctai} UTC to TAI
26324      *     <li>{@link #jauTaitt} TAI to TT
26325      *     <li>{@link #jauUtcut1} UTC to UT1
26326      *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
26327      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26328      *     <li>{@link #jauRefco} refraction constants for given ambient conditions
26329      *     <li>{@link #jauApio} astrometry parameters, CIRS-observed
26330      *
26331      * </ul>
26332      *@version  2013 October 9
26333      *
26334      *@since JSOFA release 20131202
26335      *
26336      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26337      * @throws JSOFAInternalError 
26338      * @throws JSOFAIllegalParameter 
26339      */
26340     public static void jauApio13(double utc1, double utc2, double dut1,
26341             double elong, double phi, double hm, double xp, double yp,
26342             double phpa, double tc, double rh, double wl,
26343             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26344     {
26345         double sp, theta;
26346 
26347 
26348         /* UTC to other time scales. */
26349         JulianDate tai = jauUtctai(utc1, utc2);
26350         JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
26351         JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
26352 
26353         /* TIO locator s'. */
26354         sp = jauSp00(tt.djm0, tt.djm1);
26355 
26356         /* Earth rotation angle. */
26357         theta = jauEra00(ut1.djm0, ut1.djm1);
26358 
26359         /* Refraction constants A and B. */
26360         RefCos refco = jauRefco(phpa, tc, rh, wl);
26361 
26362         /* CIRS <-> observed astrometry parameters. */
26363         jauApio(sp, theta, elong, phi, hm, xp, yp, refco.a, refco.b, astrom);
26364 
26365        
26366         /* Finished. */
26367 
26368 
26369     }
26370 
26371     /**
26372      *  Transform ICRS star data, epoch J2000.0, to CIRS.
26373      *
26374      *<p>This function is derived from the International Astronomical Union's
26375      *  SOFA (Standards of Fundamental Astronomy) software collection.
26376      *
26377      *<p>Status:  support function.
26378      *
26379      *<!-- Given: -->
26380      *     @param rc      double    ICRS right ascension at J2000.0 (radians, Note 1)
26381      *     @param dc      double    ICRS declination at J2000.0 (radians, Note 1)
26382      *     @param pr      double    RA proper motion (radians/year; Note 2)
26383      *     @param pd      double    Dec proper motion (radians/year)
26384      *     @param px      double    parallax (arcsec)
26385      *     @param rv      double    radial velocity (km/s, +ve if receding)
26386      *     @param date1   double    TDB as a 2-part...
26387      *     @param date2   double    ...Julian Date (Note 3)
26388      *
26389      *<!-- Returned:-->
26390      *     @return    double*    <b>Returned</b> CIRS geocentric RA,Dec (radians)
26391      *        eo      double*    <b>Returned</b> equation of the origins (ERA-GST, Note 5)
26392      *
26393      *<p>Notes:
26394      * <ol>
26395      *
26396      *  <li> Star data for an epoch other than J2000.0 (for example from the
26397      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26398      *     preliminary call to iauPmsafe before use.
26399      *
26400      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26401      *
26402      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26403      *     convenient way between the two arguments.  For example,
26404      *     JD(TDB)=2450123.8g could be expressed in any of these ways, among
26405      *     others:
26406      *
26407      *            date1          date2
26408      *
26409      *         2450123.8g           0.0       (JD method)
26410      *         2451545.0       -1421.3       (J2000 method)
26411      *         2400000.5       50123.2       (MJD method)
26412      *         2450123.5           0.2       (date &amp; time method)
26413      *
26414      *     <p>The JD method is the most natural and convenient to use in cases
26415      *     where the loss of several decimal digits of resolution is
26416      *     acceptable.  The J2000 method is best matched to the way the
26417      *     argument is handled internally and will deliver the optimum
26418      *     resolution.  The MJD method and the date &amp; time methods are both
26419      *     good compromises between resolution and convenience.  For most
26420      *     applications of this function the choice will not be at all
26421      *     critical.
26422      *
26423      *     <p>TT can be used instead of TDB without any significant impact on
26424      *     accuracy.
26425      *
26426      *  <li> The available accuracy is better than 1 milliarcsecond, limited
26427      *     mainly by the precession-nutation model that is used, namely
26428      *     IAU 2000A/2006.  Very close to solar system bodies, additional
26429      *     errors of up to several milliarcseconds can occur because of
26430      *     unmodeled light deflection;  however, the Sun's contribution is
26431      *     taken into account, to first order.  The accuracy limitations of
26432      *     the SOFA function iauEpv00 (used to compute Earth position and
26433      *     velocity) can contribute aberration errors of up to
26434      *     5 microarcseconds.  Light deflection at the Sun's limb is
26435      *     uncertain at the 0.4 mas level.
26436      *
26437      *  <li> Should the transformation to (equinox based) apparent place be
26438      *     required rather than (CIO based) intermediate place, subtract the
26439      *     equation of the origins from the returned right ascension:
26440      *     RA = RI - EO. (The iauAnp function can then be applied, as
26441      *     required, to keep the result in the conventional 0-2pi range.)
26442      *
26443      * </ol>
26444      *  Called:
26445      * <ul>
26446      *     <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
26447      *     <li>{@link #jauAtciq} quick ICRS to CIRS
26448      *
26449      * </ul>
26450      *@version  2013 October 9
26451      *
26452      *@since JSOFA release 20131202
26453      *
26454      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26455      */
26456     public static SphericalCoordinateEO jauAtci13(double rc, double dc,
26457             double pr, double pd, double px, double rv,
26458             double date1, double date2)
26459     {
26460         /* Star-independent astrometry parameters */
26461         Astrom astrom = new Astrom();
26462 
26463 
26464         /* The transformation parameters. */
26465         double eo = jauApci13(date1, date2, astrom);
26466 
26467         /* ICRS (epoch J2000.0) to CIRS. */
26468         SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26469         
26470         return new SphericalCoordinateEO(co, eo);
26471         /* Finished. */
26472 
26473 
26474     }
26475 
26476     /**
26477      *  Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26478      *  star-independent astrometry parameters.
26479      *
26480      *  Use of this function is appropriate when efficiency is important and
26481      *  where many star positions are to be transformed for one date.  The
26482      *  star-independent parameters can be obtained by calling one of the
26483      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26484      *
26485      *  If the parallax and proper motions are zero the iauAtciqz function
26486      *  can be used instead.
26487      *
26488      *<p>This function is derived from the International Astronomical Union's
26489      *  SOFA (Standards of Fundamental Astronomy) software collection.
26490      *
26491      *<p>Status:  support function.
26492      *
26493      *<!-- Given: -->
26494      *     @param rc double      ICRS RA,Dec at J2000.0 (radians)
26495      *     @param dc double      ICRS RA,Dec at J2000.0 (radians) 
26496      *     @param pr      double      RA proper motion (radians/year; Note 3)
26497      *     @param pd      double      Dec proper motion (radians/year)
26498      *     @param px      double      parallax (arcsec)
26499      *     @param rv      double      radial velocity (km/s, +ve if receding)
26500      *     @param astrom    star-independent astrometry parameters:
26501      *
26502      *<!-- Returned:-->
26503      *     @return     double      <b>Returned</b> CIRS RA,Dec (radians)
26504      *
26505      *<p>Notes:
26506      * <ol>
26507      *
26508      *  <li> All the vectors are with respect to BCRS axes.
26509      *
26510      *  <li> Star data for an epoch other than J2000.0 (for example from the
26511      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26512      *     preliminary call to iauPmsafe before use.
26513      *
26514      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26515      *
26516      * </ol>
26517      *  Called:
26518      * <ul>
26519      *     <li>{@link #jauPmpx} proper motion and parallax
26520      *     <li>{@link #jauLdsun} light deflection by the Sun
26521      *     <li>{@link #jauAb} stellar aberration
26522      *     <li>{@link #jauRxp} product of r-matrix and pv-vector
26523      *     <li>{@link #jauC2s} p-vector to spherical
26524      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26525      *
26526      * </ul>
26527      *@version  2013 October 9
26528      *
26529      *@since JSOFA release 20131202
26530      *
26531      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26532      */
26533     public static SphericalCoordinate jauAtciq(double rc, double dc,
26534             double pr, double pd, double px, double rv,
26535             Astrom astrom)
26536     {
26537         double pco[], pnat[], ppr[], pi[];
26538 
26539 
26540         /* Proper motion and parallax, giving BCRS coordinate direction. */
26541         pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26542 
26543         /* Light deflection by the Sun, giving BCRS natural direction. */
26544         pnat = jauLdsun(pco, astrom.eh, astrom.em);
26545 
26546         /* Aberration, giving GCRS proper direction. */
26547         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26548 
26549         /* Bias-precession-nutation, giving CIRS proper direction. */
26550         pi = jauRxp(astrom.bpn, ppr);
26551 
26552         /* CIRS RA,Dec. */
26553         SphericalCoordinate co = jauC2s(pi);
26554         co.alpha = jauAnp(co.alpha);
26555 
26556         return co;
26557         /* Finished. */
26558 
26559 
26560     }
26561 
26562     /**
26563      *  Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26564      *  star-independent astrometry parameters plus a list of light-
26565      *  deflecting bodies.
26566      *
26567      *  Use of this function is appropriate when efficiency is important and
26568      *  where many star positions are to be transformed for one date.  The
26569      *  star-independent parameters can be obtained by calling one of the
26570      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26571      *
26572      *
26573      *  If the only light-deflecting body to be taken into account is the
26574      *  Sun, the iauAtciq function can be used instead.  If in addition the
26575      *  parallax and proper motions are zero, the iauAtciqz function can be
26576      *  used.
26577      *
26578      *<p>This function is derived from the International Astronomical Union's
26579      *  SOFA (Standards of Fundamental Astronomy) software collection.
26580      *
26581      *<p>Status:  support function.
26582      *
26583      *<!-- Given: -->
26584      *     @param rc double        ICRS RA,Dec at J2000.0 (radians)
26585      *     @param dc double        ICRS RA,Dec at J2000.0 (radians) 
26586      *     @param pr      double        RA proper motion (radians/year; Note 3)
26587      *     @param pd      double        Dec proper motion (radians/year)
26588      *     @param px      double        parallax (arcsec)
26589      *     @param rv      double        radial velocity (km/s, +ve if receding)
26590      *     @param astrom      star-independent astrometry parameters:
26591      *      @param n      int            number of bodies (Note 3)
26592      *      @param b      jauLDBODY[n]  data for each of the n bodies (Notes 3,4):
26593      *
26594      *<!-- Returned:-->
26595      *     @return ri,di    double      <b>Returned</b> CIRS RA,Dec (radians)
26596      *
26597      *<p>Notes:
26598      * <ol>
26599      *
26600      *  <li> Star data for an epoch other than J2000.0 (for example from the
26601      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26602      *     preliminary call to iauPmsafe before use.
26603      *
26604      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26605      *
26606      *  <li> The struct b contains n entries, one for each body to be
26607      *     considered.  If n = 0, no gravitational light deflection will be
26608      *     applied, not even for the Sun.
26609      *
26610      *  <li> The struct b should include an entry for the Sun as well as for
26611      *     any planet or other body to be taken into account.  The entries
26612      *     should be in the order in which the light passes the body.
26613      *
26614      *  <li> In the entry in the b struct for body i, the mass parameter
26615      *     b[i].bm can, as required, be adjusted in order to allow for such
26616      *     effects as quadrupole field.
26617      *
26618      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
26619      *     the angular separation (in radians) between star and body at
26620      *     which limiting is applied.  As phi shrinks below the chosen
26621      *     threshold, the deflection is artificially reduced, reaching zero
26622      *     for phi = 0.   Example values suitable for a terrestrial
26623      *     observer, together with masses, are as follows:
26624      *     <pre>
26625      *        body i     b[i].bm        b[i].dl
26626      *
26627      *        Sun        1.0            6e-6
26628      *        Jupiter    0.00095435     3e-9
26629      *        Saturn     0.00028574     3e-10
26630      *     </pre>
26631      *  <li> For efficiency, validation of the contents of the b array is
26632      *     omitted.  The supplied masses must be greater than zero, the
26633      *     position and velocity vectors must be right, and the deflection
26634      *     limiter greater than zero.
26635      *
26636      * </ol>
26637      *  Called:
26638      * <ul>
26639      *     <li>{@link #jauPmpx} proper motion and parallax
26640      *     <li>{@link #jauLdn} light deflection by n bodies
26641      *     <li>{@link #jauAb} stellar aberration
26642      *     <li>{@link #jauRxp} product of r-matrix and pv-vector
26643      *     <li>{@link #jauC2s} p-vector to spherical
26644      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26645      *
26646      * </ul>
26647      *@version  2013 October 9
26648      *
26649      *@since JSOFA release 20131202
26650      *
26651      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26652      */
26653     public static SphericalCoordinate jauAtciqn(double rc, double dc, double pr, double pd,
26654             double px, double rv, Astrom astrom,
26655             int n, Ldbody b[])
26656     {
26657         double pco[], pnat[], ppr[] = new double[3], pi[] = new double[3];
26658 
26659 
26660         /* Proper motion and parallax, giving BCRS coordinate direction. */
26661         pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26662 
26663         /* Light deflection, giving BCRS natural direction. */
26664         pnat = jauLdn(n, b, astrom.eb, pco);
26665 
26666         /* Aberration, giving GCRS proper direction. */
26667         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26668 
26669         /* Bias-precession-nutation, giving CIRS proper direction. */
26670         pi = jauRxp(astrom.bpn, ppr);
26671 
26672         /* CIRS RA,Dec. */
26673         SphericalCoordinate co = jauC2s(pi);
26674         co.alpha = jauAnp(co.alpha);
26675 
26676         return co;
26677         /* Finished. */
26678 
26679 
26680     }
26681 
26682     /**
26683      *  Quick ICRS to CIRS transformation, given precomputed star-
26684      *  independent astrometry parameters, and assuming zero parallax and
26685      *  proper motion.
26686      *
26687      *  Use of this function is appropriate when efficiency is important and
26688      *  where many star positions are to be transformed for one date.  The
26689      *  star-independent parameters can be obtained by calling one of the
26690      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26691      *
26692      *  The corresponding function for the case of non-zero parallax and
26693      *  proper motion is iauAtciq.
26694      *
26695      *<p>This function is derived from the International Astronomical Union's
26696      *  SOFA (Standards of Fundamental Astronomy) software collection.
26697      *
26698      *<p>Status:  support function.
26699      *
26700      *<!-- Given: -->
26701      *     @param rc double      ICRS astrometric RA,Dec (radians)
26702      *     @param dc double      ICRS astrometric RA,Dec (radians) 
26703      *     @param astrom    star-independent astrometry parameters:
26704      *
26705      *<!-- Returned:-->
26706      *     @return ri,di   double       <b>Returned</b> CIRS RA,Dec (radians)
26707      *
26708      *  Note:
26709      *
26710      *     @return All  the   <b>Returned</b> vectors are with respect to BCRS axes.
26711      *
26712      *<p>References:
26713      * <ul>
26714      *
26715      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
26716      *     the Astronomical Almanac, 3rd ed., University Science Books
26717      *     (2013).
26718      *
26719      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
26720      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
26721      *
26722      * </ul>
26723      *  Called:
26724      * <ul>
26725      *     <li>{@link #jauS2c} spherical coordinates to unit vector
26726      *     <li>{@link #jauLdsun} light deflection due to Sun
26727      *     <li>{@link #jauAb} stellar aberration
26728      *     <li>{@link #jauRxp} product of r-matrix and p-vector
26729      *     <li>{@link #jauC2s} p-vector to spherical
26730      *     <li>{@link #jauAnp} normalize angle into range +/- pi
26731      *
26732      * </ul>
26733      *@version  2013 October 9
26734      *
26735      *@since JSOFA release 20131202
26736      *
26737      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26738      */
26739     public static SphericalCoordinate jauAtciqz(double rc, double dc, Astrom astrom)
26740     {
26741         double pco[], pnat[], ppr[] = new double[3], pi[];
26742 
26743 
26744         /* BCRS coordinate direction (unit vector). */
26745         pco = jauS2c(rc, dc);
26746 
26747         /* Light deflection by the Sun, giving BCRS natural direction. */
26748         pnat = jauLdsun(pco, astrom.eh, astrom.em);
26749 
26750         /* Aberration, giving GCRS proper direction. */
26751         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26752 
26753         /* Bias-precession-nutation, giving CIRS proper direction. */
26754         pi = jauRxp(astrom.bpn, ppr);
26755 
26756         /* CIRS RA,Dec. */
26757         SphericalCoordinate co = jauC2s(pi);
26758         co.alpha = jauAnp(co.alpha);
26759 
26760         return co;
26761         /* Finished. */
26762 
26763 
26764     }
26765 
26766     /**
26767      *  ICRS RA,Dec to observed place.  The caller supplies UTC, site
26768      *  coordinates, ambient air conditions and observing wavelength.
26769      *
26770      *  SOFA models are used for the Earth ephemeris, bias-precession-
26771      *  nutation, Earth orientation and refraction.
26772      *
26773      *<p>This function is derived from the International Astronomical Union's
26774      *  SOFA (Standards of Fundamental Astronomy) software collection.
26775      *
26776      *<p>Status:  support function.
26777      *
26778      *<!-- Given: -->
26779      *     @param rc double    ICRS right ascension at J2000.0 (radians, Note 1)
26780      *     @param dc double    ICRS right ascension at J2000.0 (radians, Note 1) 
26781      *     @param pr      double    RA proper motion (radians/year; Note 2)
26782      *     @param pd      double    Dec proper motion (radians/year)
26783      *     @param px      double    parallax (arcsec)
26784      *     @param rv      double    radial velocity (km/s, +ve if receding)
26785      *     @param utc1    double    UTC as a 2-part...
26786      *     @param utc2    double    ...quasi Julian Date (Notes 3-4)
26787      *     @param dut1    double    UT1-UTC (seconds, Note 5)
26788      *     @param elong   double    longitude (radians, east +ve, Note 6)
26789      *     @param phi     double    latitude (geodetic, radians, Note 6)
26790      *     @param hm      double    height above ellipsoid (m, geodetic, Notes 6,8)
26791      *     @param xp double    polar motion coordinates (radians, Note 7)
26792      *     @param yp double    polar motion coordinates (radians, Note 7) 
26793      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
26794      *     @param tc      double    ambient temperature at the observer (deg C)
26795      *     @param rh      double    relative humidity at the observer (range 0-1)
26796      *     @param wl      double    wavelength (micrometers, Note 9)
26797      *
26798      *<!-- Returned:-->
26799      *     @return aob     double*    <b>Returned</b> observed azimuth (radians: N=0,E=90)
26800      *             zob     double*    <b>Returned</b> observed zenith distance (radians)
26801      *             hob     double*    <b>Returned</b> observed hour angle (radians)
26802      *             dob     double*    <b>Returned</b> observed declination (radians)
26803      *             rob     double*    <b>Returned</b> observed right ascension (CIO-based, radians)
26804      *             eo      double*    <b>Returned</b> equation of the origins (ERA-GST)
26805      *
26806      *  @throws JSOFAInternalError
26807      *  @throws JSOFAIllegalParameter
26808      *             int       status:   <b>Returned</b> +1 = dubious year (Note 4)
26809      *                               0  =   <b>Returned</b> OK
26810      *                              -1  =   <b>Returned</b> unacceptable date
26811      *
26812      *<p>Notes:
26813      * <ol>
26814      *
26815      *  <li> Star data for an epoch other than J2000.0 (for example from the
26816      *      Hipparcos catalog, which has an epoch of J1991.25) will require
26817      *      a preliminary call to iauPmsafe before use.
26818      *
26819      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26820      *
26821      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26822      *      convenient way between the two arguments, for example where utc1
26823      *      is the Julian Day Number and utc2 is the fraction of a day.
26824      *
26825      *      <p>However, JD cannot unambiguously represent UTC during a leap
26826      *      second unless special measures are taken.  The convention in the
26827      *      present function is that the JD day represents UTC days whether
26828      *      the length is 86399, 86400 or 86401 SI seconds.
26829      *
26830      *      <p>Applications should use the function iauDtf2d to convert from
26831      *      calendar date and time of day into 2-part quasi Julian Date, as
26832      *      it implements the leap-second-ambiguity convention just
26833      *      described.
26834      *
26835      *  <li> The warning status "dubious year" flags UTCs that predate the
26836      *      introduction of the time scale or that are too far in the
26837      *      future to be trusted.  See iauDat for further details.
26838      *
26839      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
26840      *      one second at the end of each positive UTC leap second,
26841      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
26842      *      practice is under review, and in the future UT1-UTC may grow
26843      *      essentially without limit.
26844      *
26845      *  <li> The geographical coordinates are with respect to the WGS84
26846      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26847      *      longitude required by the present function is east-positive
26848      *      (i.e. right-handed), in accordance with geographical convention.
26849      *
26850      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26851      *      values are the coordinates (in radians) of the Celestial
26852      *      Intermediate Pole with respect to the International Terrestrial
26853      *      Reference System (see IERS Conventions 2003), measured along the
26854      *      meridians 0 and 90 deg west respectively.  For many
26855      *      applications, xp and yp can be set to zero.
26856      *
26857      *  <li> If hm, the height above the ellipsoid of the observing station
26858      *      in meters, is not known but phpa, the pressure in hPa (=mB),
26859      *      is available, an adequate estimate of hm can be obtained from
26860      *      the expression
26861      *
26862      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26863      *
26864      *      <p>where tsl is the approximate sea-level air temperature in K
26865      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26866      *      52).  Similarly, if the pressure phpa is not known, it can be
26867      *      estimated from the height of the observing station, hm, as
26868      *      follows:
26869      *
26870      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26871      *
26872      *      <p>Note, however, that the refraction is nearly proportional to
26873      *      the pressure and that an accurate phpa value is important for
26874      *      precise work.
26875      *
26876      *  <li> The argument wl specifies the observing wavelength in
26877      *      micrometers.  The transition from optical to radio is assumed to
26878      *      occur at 100 micrometers (about 3000 GHz).
26879      *
26880      *  <li> The accuracy of the result is limited by the corrections for
26881      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
26882      *      Providing the meteorological parameters are known accurately and
26883      *      there are no gross local effects, the predicted observed
26884      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
26885      *      (radio) for a zenith distance of less than 70 degrees, better
26886      *      than 30 arcsec (optical or radio) at 85 degrees and better
26887      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
26888      *
26889      *      <p>Without refraction, the complementary functions iauAtco13 and
26890      *      iauAtoc13 are self-consistent to better than 1 microarcsecond
26891      *      all over the celestial sphere.  With refraction included,
26892      *      consistency falls off at high zenith distances, but is still
26893      *      better than 0.05 arcsec at 85 degrees.
26894      *
26895      *  <li> "Observed" Az,ZD means the position that would be seen by a
26896      *      perfect geodetically aligned theodolite.  (Zenith distance is
26897      *      used rather than altitude in order to reflect the fact that no
26898      *      allowance is made for depression of the horizon.)  This is
26899      *      related to the observed HA,Dec via the standard rotation, using
26900      *      the geodetic latitude (corrected for polar motion), while the
26901      *      observed HA and RA are related simply through the Earth rotation
26902      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
26903      *      means the position that would be seen by a perfect equatorial
26904      *      with its polar axis aligned to the Earth's axis of rotation.
26905      *
26906      *  <li> It is advisable to take great care with units, as even unlikely
26907      *      values of the input parameters are accepted and processed in
26908      *      accordance with the models used.
26909      *
26910      * </ol>
26911      *  Called:
26912      * <ul>
26913      *     <li>{@link #jauApco13} astrometry parameters, ICRS-observed, 2013
26914      *     <li>{@link #jauAtciq} quick ICRS to CIRS
26915      *     <li>{@link #jauAtioq} quick ICRS to observed
26916      *
26917      * </ul>
26918      *@version  2013 October 9
26919      *
26920      *@since JSOFA release 20131202
26921      *
26922      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26923      * @throws JSOFAInternalError 
26924      * @throws JSOFAIllegalParameter 
26925      */
26926     public static ObservedPositionEO jauAtco13(double rc, double dc,
26927             double pr, double pd, double px, double rv,
26928             double utc1, double utc2, double dut1,
26929             double elong, double phi, double hm, double xp, double yp,
26930             double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
26931     {
26932         Astrom astrom = new Astrom();
26933 
26934 
26935         /* Star-independent astrometry parameters. */
26936         double eo = jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
26937                 phpa, tc, rh, wl, astrom);
26938 
26939         /* Transform ICRS to CIRS. */
26940         SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26941 
26942         /* Transform CIRS to observed. */
26943         ObservedPosition obs = jauAtioq(co.alpha, co.delta, astrom);
26944 
26945       
26946         return new ObservedPositionEO(obs, eo);
26947         
26948         /* Finished. */
26949 
26950 
26951     }
26952 
26953     /**
26954      *  Transform star RA,Dec from geocentric CIRS to ICRS astrometric.
26955      *
26956      *<p>This function is derived from the International Astronomical Union's
26957      *  SOFA (Standards of Fundamental Astronomy) software collection.
26958      *
26959      *<p>Status:  support function.
26960      *
26961      *<!-- Given: -->
26962      *     @param ri double   CIRS geocentric RA,Dec (radians)
26963      *     @param di double   CIRS geocentric RA,Dec (radians) 
26964      *     @param date1   double   TDB as a 2-part...
26965      *     @param date2   double   ...Julian Date (Note 1)
26966      *
26967      *<!-- Returned:-->
26968      *     @return rc,dc   double    <b>Returned</b> ICRS astrometric RA,Dec (radians)
26969      *      eo      double    <b>Returned</b> equation of the origins (ERA-GST, Note 4)
26970      *
26971      *<p>Notes:
26972      * <ol>
26973      *
26974      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26975      *     convenient way between the two arguments.  For example,
26976      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
26977      *     others:
26978      *
26979      *            date1          date2
26980      *
26981      *         2450123.7           0.0       (JD method)
26982      *         2451545.0       -1421.3       (J2000 method)
26983      *         2400000.5       50123.2       (MJD method)
26984      *         2450123.5           0.2       (date &amp; time method)
26985      *
26986      *     <p>The JD method is the most natural and convenient to use in cases
26987      *     where the loss of several decimal digits of resolution is
26988      *     acceptable.  The J2000 method is best matched to the way the
26989      *     argument is handled internally and will deliver the optimum
26990      *     resolution.  The MJD method and the date &amp; time methods are both
26991      *     good compromises between resolution and convenience.  For most
26992      *     applications of this function the choice will not be at all
26993      *     critical.
26994      *
26995      *     <p>TT can be used instead of TDB without any significant impact on
26996      *     accuracy.
26997      *
26998      *  <li> Iterative techniques are used for the aberration and light
26999      *     deflection corrections so that the functions iauAtic13 (or
27000      *     iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27001      *     even at the edge of the Sun's disk the discrepancy is only about
27002      *     1 nanoarcsecond.
27003      *
27004      *  <li> The available accuracy is better than 1 milliarcsecond, limited
27005      *     mainly by the precession-nutation model that is used, namely
27006      *     IAU 2000A/2006.  Very close to solar system bodies, additional
27007      *     errors of up to several milliarcseconds can occur because of
27008      *     unmodeled light deflection;  however, the Sun's contribution is
27009      *     taken into account, to first order.  The accuracy limitations of
27010      *     the SOFA function iauEpv00 (used to compute Earth position and
27011      *     velocity) can contribute aberration errors of up to
27012      *     5 microarcseconds.  Light deflection at the Sun's limb is
27013      *     uncertain at the 0.4 mas level.
27014      *
27015      *  <li> Should the transformation to (equinox based) J2000.0 mean place
27016      *     be required rather than (CIO based) ICRS coordinates, subtract the
27017      *     equation of the origins from the returned right ascension:
27018      *     RA = RI - EO.  (The iauAnp function can then be applied, as
27019      *     required, to keep the result in the conventional 0-2pi range.)
27020      *
27021      * </ol>
27022      *  Called:
27023      * <ul>
27024      *     <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
27025      *     <li>{@link #jauAticq} quick CIRS to ICRS astrometric
27026      *
27027      * </ul>
27028      *@version  2013 October 9
27029      *
27030      *@since JSOFA release 20131202
27031      *
27032      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27033      */
27034     public static SphericalCoordinateEO jauAtic13(double ri, double di, double date1, double date2)
27035     {
27036         /* Star-independent astrometry parameters */
27037         Astrom astrom = new Astrom();
27038 
27039 
27040         /* Star-independent astrometry parameters. */
27041         double eo = jauApci13(date1, date2, astrom);
27042 
27043         /* CIRS to ICRS astrometric. */
27044         SphericalCoordinate co = jauAticq(ri, di, astrom);
27045 
27046         return new SphericalCoordinateEO(co,eo);
27047         /* Finished. */
27048 
27049 
27050     }
27051 
27052     /**
27053      *  Quick CIRS RA,Dec to ICRS astrometric place, given the star-
27054      *  independent astrometry parameters.
27055      *
27056      *  Use of this function is appropriate when efficiency is important and
27057      *  where many star positions are all to be transformed for one date.
27058      *  The star-independent astrometry parameters can be obtained by
27059      *  calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27060      *  or iauApcs[13].
27061      *
27062      *<p>This function is derived from the International Astronomical Union's
27063      *  SOFA (Standards of Fundamental Astronomy) software collection.
27064      *
27065      *<p>Status:  support function.
27066      *
27067      *<!-- Given: -->
27068      *     @param ri double      CIRS RA,Dec (radians)
27069      *     @param di double      CIRS RA,Dec (radians) 
27070      *     @param astrom    star-independent astrometry parameters:
27071      *
27072      *<!-- Returned:-->
27073      *     @return rc,dc   double       <b>Returned</b> ICRS astrometric RA,Dec (radians)
27074      *
27075      *<p>Notes:
27076      * <ol>
27077      *
27078      *  <li> Only the Sun is taken into account in the light deflection
27079      *     correction.
27080      *
27081      *  <li> Iterative techniques are used for the aberration and light
27082      *     deflection corrections so that the functions iauAtic13 (or
27083      *     iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27084      *     even at the edge of the Sun's disk the discrepancy is only about
27085      *     1 nanoarcsecond.
27086      *
27087      * </ol>
27088      *  Called:
27089      * <ul>
27090      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27091      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27092      *     <li>{@link #jauZp} zero p-vector
27093      *     <li>{@link #jauAb} stellar aberration
27094      *     <li>{@link #jauLdsun} light deflection by the Sun
27095      *     <li>{@link #jauC2s} p-vector to spherical
27096      *     <li>{@link #jauAnp} normalize angle into range +/- pi
27097      *
27098      * </ul>
27099      *@version  2013 October 9
27100      *
27101      *@since JSOFA release 20131202
27102      *
27103      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27104      */
27105     public static SphericalCoordinate  jauAticq(double ri, double di, Astrom astrom )
27106     {
27107         int j, i;
27108         double pi[] , ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], 
27109                 before[] = new double[3], r2, r,
27110                 after[];
27111 
27112 
27113         /* CIRS RA,Dec to Cartesian. */
27114         pi = jauS2c(ri, di);
27115 
27116         /* Bias-precession-nutation, giving GCRS proper direction. */
27117         ppr = jauTrxp(astrom.bpn, pi);
27118 
27119         /* Aberration, giving GCRS natural direction. */
27120         jauZp(d);
27121         for (j = 0; j < 2; j++) {
27122             r2 = 0.0;
27123             for (i = 0; i < 3; i++) {
27124                 w = ppr[i] - d[i];
27125                 before[i] = w;
27126                 r2 += w*w;
27127             }
27128             r = sqrt(r2);
27129             for (i = 0; i < 3; i++) {
27130                 before[i] /= r;
27131             }
27132             after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27133             r2 = 0.0;
27134             for (i = 0; i < 3; i++) {
27135                 d[i] = after[i] - before[i];
27136                 w = ppr[i] - d[i];
27137                 pnat[i] = w;
27138                 r2 += w*w;
27139             }
27140             r = sqrt(r2);
27141             for (i = 0; i < 3; i++) {
27142                 pnat[i] /= r;
27143             }
27144         }
27145 
27146         /* Light deflection by the Sun, giving BCRS coordinate direction. */
27147         jauZp(d);
27148         for (j = 0; j < 5; j++) {
27149             r2 = 0.0;
27150             for (i = 0; i < 3; i++) {
27151                 w = pnat[i] - d[i];
27152                 before[i] = w;
27153                 r2 += w*w;
27154             }
27155             r = sqrt(r2);
27156             for (i = 0; i < 3; i++) {
27157                 before[i] /= r;
27158             }
27159             after = jauLdsun(before, astrom.eh, astrom.em);
27160             r2 = 0.0;
27161             for (i = 0; i < 3; i++) {
27162                 d[i] = after[i] - before[i];
27163                 w = pnat[i] - d[i];
27164                 pco[i] = w;
27165                 r2 += w*w;
27166             }
27167             r = sqrt(r2);
27168             for (i = 0; i < 3; i++) {
27169                 pco[i] /= r;
27170             }
27171         }
27172 
27173         /* ICRS astrometric RA,Dec. */
27174         SphericalCoordinate co = jauC2s(pco);
27175         co.alpha = jauAnp(co.alpha);
27176 
27177         return co;
27178         /* Finished. */
27179 
27180 
27181     }
27182 
27183     /**
27184      *  Quick CIRS to ICRS astrometric place transformation, given the star-
27185      *  independent astrometry parameters plus a list of light-deflecting
27186      *  bodies.
27187      *
27188      *  Use of this function is appropriate when efficiency is important and
27189      *  where many star positions are all to be transformed for one date.
27190      *  The star-independent astrometry parameters can be obtained by
27191      *  calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27192      *  or iauApcs[13].
27193      *
27194      *  If the only light-deflecting body to be taken into account is the
27195      *  Sun, the iauAticq function can be used instead.
27196      *
27197      *<p>This function is derived from the International Astronomical Union's
27198      *  SOFA (Standards of Fundamental Astronomy) software collection.
27199      *
27200      *<p>Status:  support function.
27201      *
27202      *<!-- Given: -->
27203      *     @param ri double       CIRS RA,Dec (radians)
27204      *     @param di double       CIRS RA,Dec (radians) 
27205      *     @param astrom     star-independent astrometry parameters:
27206      *
27207      *<!-- Returned:-->
27208      *     @return rc,dc   double       <b>Returned</b> ICRS astrometric RA,Dec (radians)
27209      *
27210      *<p>Notes:
27211      * <ol>
27212      *
27213      *  <li> Iterative techniques are used for the aberration and light
27214      *     deflection corrections so that the functions iauAticqn and
27215      *     iauAtciqn are accurate inverses; even at the edge of the Sun's
27216      *     disk the discrepancy is only about 1 nanoarcsecond.
27217      *
27218      *  <li> If the only light-deflecting body to be taken into account is the
27219      *     Sun, the iauAticq function can be used instead.
27220      *
27221      *  <li> The struct b contains n entries, one for each body to be
27222      *     considered.  If n = 0, no gravitational light deflection will be
27223      *     applied, not even for the Sun.
27224      *
27225      *  <li> The struct b should include an entry for the Sun as well as for
27226      *     any planet or other body to be taken into account.  The entries
27227      *     should be in the order in which the light passes the body.
27228      *
27229      *  <li> In the entry in the b struct for body i, the mass parameter
27230      *     b[i].bm can, as required, be adjusted in order to allow for such
27231      *     effects as quadrupole field.
27232      *
27233      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
27234      *     the angular separation (in radians) between star and body at
27235      *     which limiting is applied.  As phi shrinks below the chosen
27236      *     threshold, the deflection is artificially reduced, reaching zero
27237      *     for phi = 0.   Example values suitable for a terrestrial
27238      *     observer, together with masses, are as follows:
27239      *
27240      *        <p>body i     b[i].bm        b[i].dl
27241      *
27242      *        <p>Sun        1.0            6e-6
27243      *        Jupiter    0.00095435     3e-9
27244      *        Saturn     0.00028574     3e-10
27245      *
27246      *  <li> For efficiency, validation of the contents of the b array is
27247      *     omitted.  The supplied masses must be greater than zero, the
27248      *     position and velocity vectors must be right, and the deflection
27249      *     limiter greater than zero.
27250      *
27251      * </ol>
27252      *  Called:
27253      * <ul>
27254      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27255      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27256      *     <li>{@link #jauZp} zero p-vector
27257      *     <li>{@link #jauAb} stellar aberration
27258      *     <li>{@link #jauLdn} light deflection by n bodies
27259      *     <li>{@link #jauC2s} p-vector to spherical
27260      *     <li>{@link #jauAnp} normalize angle into range +/- pi
27261      *
27262      * </ul>
27263      *@version  2013 October 9
27264      *
27265      *@since JSOFA release 20131202
27266      *
27267      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27268      */
27269     public static SphericalCoordinate jauAticqn(double ri, double di, Astrom astrom,
27270             int n, Ldbody b[])
27271     {
27272         int j, i;
27273         double pi[], ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], before[] = new double[3], r2, r,
27274                 after[];
27275 
27276 
27277         /* CIRS RA,Dec to Cartesian. */
27278         pi = jauS2c(ri, di);
27279 
27280         /* Bias-precession-nutation, giving GCRS proper direction. */
27281         ppr = jauTrxp(astrom.bpn, pi);
27282 
27283         /* Aberration, giving GCRS natural direction. */
27284         jauZp(d);
27285         for (j = 0; j < 2; j++) {
27286             r2 = 0.0;
27287             for (i = 0; i < 3; i++) {
27288                 w = ppr[i] - d[i];
27289                 before[i] = w;
27290                 r2 += w*w;
27291             }
27292             r = sqrt(r2);
27293             for (i = 0; i < 3; i++) {
27294                 before[i] /= r;
27295             }
27296             after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27297             r2 = 0.0;
27298             for (i = 0; i < 3; i++) {
27299                 d[i] = after[i] - before[i];
27300                 w = ppr[i] - d[i];
27301                 pnat[i] = w;
27302                 r2 += w*w;
27303             }
27304             r = sqrt(r2);
27305             for (i = 0; i < 3; i++) {
27306                 pnat[i] /= r;
27307             }
27308         }
27309 
27310         /* Light deflection, giving BCRS coordinate direction. */
27311         jauZp(d);
27312         for (j = 0; j < 5; j++) {
27313             r2 = 0.0;
27314             for (i = 0; i < 3; i++) {
27315                 w = pnat[i] - d[i];
27316                 before[i] = w;
27317                 r2 += w*w;
27318             }
27319             r = sqrt(r2);
27320             for (i = 0; i < 3; i++) {
27321                 before[i] /= r;
27322             }
27323             after = jauLdn(n, b, astrom.eb, before);
27324             r2 = 0.0;
27325             for (i = 0; i < 3; i++) {
27326                 d[i] = after[i] - before[i];
27327                 w = pnat[i] - d[i];
27328                 pco[i] = w;
27329                 r2 += w*w;
27330             }
27331             r = sqrt(r2);
27332             for (i = 0; i < 3; i++) {
27333                 pco[i] /= r;
27334             }
27335         }
27336 
27337         /* ICRS astrometric RA,Dec. */
27338         SphericalCoordinate co = jauC2s(pco);
27339         co.alpha = jauAnp(co.alpha);
27340 
27341         return co;
27342         /* Finished. */
27343 
27344 
27345     }
27346     
27347     /**
27348      * Observed Position.
27349      *  "Observed" Az,ZD means the position that would be seen by a
27350      *      perfect geodetically aligned theodolite.  (Zenith distance is
27351      *      used rather than altitude in order to reflect the fact that no
27352      *      allowance is made for depression of the horizon.)  This is
27353      *      related to the observed HA,Dec via the standard rotation, using
27354      *      the geodetic latitude (corrected for polar motion), while the
27355      *      observed HA and RA are related simply through the Earth rotation
27356      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27357      *      means the position that would be seen by a perfect equatorial
27358      *      with its polar axis aligned to the Earth's axis of rotation..
27359      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
27360      * @version $Revision$ $date$
27361      */
27362     public static class ObservedPosition{
27363         /**    observed azimuth (radians: N=0,E=90) */
27364         public double   aob;
27365 
27366         /**    observed zenith distance (radians)   */
27367         public double   zob;
27368 
27369         /**    observed Hour Angle (radians)        */
27370         public double   hob;
27371 
27372         /**    observed Declination (radians)       */
27373         public double   dob;
27374 
27375         /**    observed Right Ascension (radians)   */
27376         public double   rob;
27377         public ObservedPosition(double   aob,
27378                 double   zob,
27379                 double   hob,
27380                 double   dob,
27381                 double   rob
27382         ) {
27383             this.aob =  aob;
27384             this.zob =  zob;
27385             this.hob =  hob;
27386             this.dob =  dob;
27387             this.rob =  rob;  
27388         }
27389     }
27390     
27391     /**
27392      * Observed position with the equation of the origins.
27393      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Mar 2014
27394      * @version $Revision$ $date$
27395      */
27396     public static class ObservedPositionEO {
27397        /**
27398         * observed position.
27399         */
27400         public ObservedPosition op;
27401         /**
27402          * The equation of the origins.    The equation of the origins is the distance between the true
27403          *  equinox and the celestial intermediate origin and, equivalently,
27404          *  the difference between Earth rotation angle and Greenwich
27405          *  apparent sidereal time (ERA-GST).  It comprises the precession
27406          *  (since J2000.0) in right ascension plus the equation of the
27407          *  equinoxes (including the small correction terms).   
27408          */
27409         public double eo;
27410         /**
27411          * @param op
27412          * @param eo
27413          */
27414         public ObservedPositionEO(ObservedPosition op, double eo) {
27415             this.op = op;
27416             this.eo = eo;
27417         }
27418         
27419     }
27420 
27421     
27422     
27423     
27424     /**
27425      *  CIRS RA,Dec to observed place.  The caller supplies UTC, site
27426      *  coordinates, ambient air conditions and observing wavelength.
27427      *
27428      *<p>This function is derived from the International Astronomical Union's
27429      *  SOFA (Standards of Fundamental Astronomy) software collection.
27430      *
27431      *<p>Status:  support function.
27432      *
27433      *<!-- Given: -->
27434      *     @param ri      double    CIRS right ascension (CIO-based, radians)
27435      *     @param di      double    CIRS declination (radians)
27436      *     @param utc1    double    UTC as a 2-part...
27437      *     @param utc2    double    ...quasi Julian Date (Notes 1,2)
27438      *     @param dut1    double    UT1-UTC (seconds, Note 3)
27439      *     @param elong   double    longitude (radians, east +ve, Note 4)
27440      *     @param phi     double    geodetic latitude (radians, Note 4)
27441      *     @param hm      double    height above ellipsoid (m, geodetic Notes 4,6)
27442      *     @param xp double    polar motion coordinates (radians, Note 5)
27443      *     @param yp double    polar motion coordinates (radians, Note 5) 
27444      *     @param phpa    double    pressure at the observer (hPa = mB, Note 6)
27445      *     @param tc      double    ambient temperature at the observer (deg C)
27446      *     @param rh      double    relative humidity at the observer (range 0-1)
27447      *     @param wl      double    wavelength (micrometers, Note 7)
27448      *
27449      *<!-- Returned:-->
27450      *     @return aob     double*    <b>Returned</b> observed azimuth (radians: N=0,E=90)
27451      *             zob     double*    <b>Returned</b> observed zenith distance (radians)
27452      *             hob     double*    <b>Returned</b> observed hour angle (radians)
27453      *             dob     double*    <b>Returned</b> observed declination (radians)
27454      *             rob     double*    <b>Returned</b> observed right ascension (CIO-based, radians)
27455      *
27456      *  @throws JSOFAInternalError
27457      *  @throws JSOFAIllegalParameter
27458      *             int       status:   <b>Returned</b> +1 = dubious year (Note 2)
27459      *                              0  =   <b>Returned</b> OK
27460      *                              -1  =   <b>Returned</b> unacceptable date
27461      *
27462      *<p>Notes:
27463      * <ol>
27464      *
27465      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27466      *      convenient way between the two arguments, for example where utc1
27467      *      is the Julian Day Number and utc2 is the fraction of a day.
27468      *
27469      *      <p>However, JD cannot unambiguously represent UTC during a leap
27470      *      second unless special measures are taken.  The convention in the
27471      *      present function is that the JD day represents UTC days whether
27472      *      the length is 86399, 86400 or 86401 SI seconds.
27473      *
27474      *      <p>Applications should use the function iauDtf2d to convert from
27475      *      calendar date and time of day into 2-part quasi Julian Date, as
27476      *      it implements the leap-second-ambiguity convention just
27477      *      described.
27478      *
27479      *  <li> The warning status "dubious year" flags UTCs that predate the
27480      *      introduction of the time scale or that are too far in the
27481      *      future to be trusted.  See iauDat for further details.
27482      *
27483      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
27484      *      one second at the end of each positive UTC leap second,
27485      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
27486      *      practice is under review, and in the future UT1-UTC may grow
27487      *      essentially without limit.
27488      *
27489      *  <li> The geographical coordinates are with respect to the WGS84
27490      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
27491      *      longitude required by the present function is east-positive
27492      *      (i.e. right-handed), in accordance with geographical convention.
27493      *
27494      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
27495      *      values are the coordinates (in radians) of the Celestial
27496      *      Intermediate Pole with respect to the International Terrestrial
27497      *      Reference System (see IERS Conventions 2003), measured along the
27498      *      meridians 0 and 90 deg west respectively.  For many
27499      *      applications, xp and yp can be set to zero.
27500      *
27501      *  <li> If hm, the height above the ellipsoid of the observing station
27502      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
27503      *      available, an adequate estimate of hm can be obtained from the
27504      *      expression
27505      *
27506      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27507      *
27508      *      <p>where tsl is the approximate sea-level air temperature in K
27509      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27510      *      52).  Similarly, if the pressure phpa is not known, it can be
27511      *      estimated from the height of the observing station, hm, as
27512      *      follows:
27513      *
27514      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27515      *
27516      *      <p>Note, however, that the refraction is nearly proportional to
27517      *      the pressure and that an accurate phpa value is important for
27518      *      precise work.
27519      *
27520      *  <li> The argument wl specifies the observing wavelength in
27521      *      micrometers.  The transition from optical to radio is assumed to
27522      *      occur at 100 micrometers (about 3000 GHz).
27523      *
27524      *  <li> "Observed" Az,ZD means the position that would be seen by a
27525      *      perfect geodetically aligned theodolite.  (Zenith distance is
27526      *      used rather than altitude in order to reflect the fact that no
27527      *      allowance is made for depression of the horizon.)  This is
27528      *      related to the observed HA,Dec via the standard rotation, using
27529      *      the geodetic latitude (corrected for polar motion), while the
27530      *      observed HA and RA are related simply through the Earth rotation
27531      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27532      *      means the position that would be seen by a perfect equatorial
27533      *      with its polar axis aligned to the Earth's axis of rotation.
27534      *
27535      *  <li> The accuracy of the result is limited by the corrections for
27536      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27537      *      Providing the meteorological parameters are known accurately and
27538      *      there are no gross local effects, the predicted astrometric
27539      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27540      *      (radio) for a zenith distance of less than 70 degrees, better
27541      *      than 30 arcsec (optical or radio) at 85 degrees and better
27542      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27543      *
27544      *  <li> The complementary functions iauAtio13 and iauAtoi13 are self-
27545      *      consistent to better than 1 microarcsecond all over the
27546      *      celestial sphere.
27547      *
27548      *  <li> It is advisable to take great care with units, as even unlikely
27549      *      values of the input parameters are accepted and processed in
27550      *      accordance with the models used.
27551      *
27552      * </ol>
27553      *  Called:
27554      * <ul>
27555      *     <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
27556      *     <li>{@link #jauAtioq} quick CIRS to observed
27557      *
27558      * </ul>
27559      *@version  2013 October 9
27560      *
27561      *@since JSOFA release 20131202
27562      *
27563      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27564      * @throws JSOFAInternalError 
27565      * @throws JSOFAIllegalParameter 
27566      */
27567     public static ObservedPosition jauAtio13(double ri, double di,
27568             double utc1, double utc2, double dut1,
27569             double elong, double phi, double hm, double xp, double yp,
27570             double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
27571     {
27572         Astrom astrom = new Astrom();
27573 
27574 
27575         /* Star-independent astrometry parameters for CIRS->observed. */
27576         jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27577                 phpa, tc, rh, wl, astrom);
27578 
27579         /* Transform CIRS to observed. */
27580         return jauAtioq(ri, di, astrom);
27581 
27582         /* Finished. */
27583 
27584 
27585     }
27586 
27587     /**
27588      *  Quick CIRS to observed place transformation.
27589      *
27590      *  Use of this function is appropriate when efficiency is important and
27591      *  where many star positions are all to be transformed for one date.
27592      *  The star-independent astrometry parameters can be obtained by
27593      *  calling iauApio[13] or iauApco[13].
27594      *
27595      *<p>This function is derived from the International Astronomical Union's
27596      *  SOFA (Standards of Fundamental Astronomy) software collection.
27597      *
27598      *<p>Status:  support function.
27599      *
27600      *<!-- Given: -->
27601      *     @param ri      double      CIRS right ascension
27602      *     @param di      double      CIRS declination
27603      *     @param astrom    star-independent astrometry parameters:
27604      *
27605      *<!-- Returned:-->
27606      *     @return aob     double*      <b>Returned</b> observed azimuth (radians: N=0,E=90)
27607      *             zob     double*      <b>Returned</b> observed zenith distance (radians)
27608      *             hob     double*      <b>Returned</b> observed hour angle (radians)
27609      *             dob     double*      <b>Returned</b> observed declination (radians)
27610      *             rob     double*      <b>Returned</b> observed right ascension (CIO-based, radians)
27611      *
27612      *<p>Notes:
27613      * <ol>
27614      *
27615      *  <li> This function returns zenith distance rather than altitude in
27616      *     order to reflect the fact that no allowance is made for
27617      *     depression of the horizon.
27618      *
27619      *  <li> The accuracy of the result is limited by the corrections for
27620      *     refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27621      *     Providing the meteorological parameters are known accurately and
27622      *     there are no gross local effects, the predicted observed
27623      *     coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27624      *     (radio) for a zenith distance of less than 70 degrees, better
27625      *     than 30 arcsec (optical or radio) at 85 degrees and better
27626      *     than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27627      *
27628      *     <p>Without refraction, the complementary functions iauAtioq and
27629      *     iauAtoiq are self-consistent to better than 1 microarcsecond all
27630      *     over the celestial sphere.  With refraction included, consistency
27631      *     falls off at high zenith distances, but is still better than
27632      *     0.05 arcsec at 85 degrees.
27633      *
27634      *  <li> It is advisable to take great care with units, as even unlikely
27635      *     values of the input parameters are accepted and processed in
27636      *     accordance with the models used.
27637      *
27638      *  <li> The CIRS RA,Dec is obtained from a star catalog mean place by
27639      *     allowing for space motion, parallax, the Sun's gravitational lens
27640      *     effect, annual aberration and precession-nutation.  For star
27641      *     positions in the ICRS, these effects can be applied by means of
27642      *     the iauAtci13 (etc.) functions.  Starting from classical "mean
27643      *     place" systems, additional transformations will be needed first.
27644      *
27645      *  <li> "Observed" Az,El means the position that would be seen by a
27646      *     perfect geodetically aligned theodolite.  This is obtained from
27647      *     the CIRS RA,Dec by allowing for Earth orientation and diurnal
27648      *     aberration, rotating from equator to horizon coordinates, and
27649      *     then adjusting for refraction.  The HA,Dec is obtained by
27650      *     rotating back into equatorial coordinates, and is the position
27651      *     that would be seen by a perfect equatorial with its polar axis
27652      *     aligned to the Earth's axis of rotation.  Finally, the RA is
27653      *     obtained by subtracting the HA from the local ERA.
27654      *
27655      *  <li> The star-independent CIRS-to-observed-place parameters in ASTROM
27656      *     may be computed with iauApio[13] or iauApco[13].  If nothing has
27657      *     changed significantly except the time, iauAper[13] may be used to
27658      *     perform the requisite adjustment to the astrom structure.
27659      *
27660      * </ol>
27661      *  Called:
27662      * <ul>
27663      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27664      *     <li>{@link #jauC2s} p-vector to spherical
27665      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
27666      *
27667      * </ul>
27668      *@version  2013 December 5
27669      *
27670      *@since JSOFA release 20131202
27671      *
27672      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27673      */
27674     public static ObservedPosition jauAtioq(double ri, double di, Astrom astrom)
27675     {
27676         /* Minimum cos(alt) and sin(alt) for refraction purposes */
27677         final double CELMIN = 1e-6;
27678         final double SELMIN = 0.05;
27679 
27680         double v[] = new double[3], x, y, z, xhd, yhd, zhd, f, xhdt, yhdt, zhdt,
27681                 xaet, yaet, zaet, azobs, r, tz, w, del, cosdel,
27682                 xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs;
27683 
27684         /*--------------------------------------------------------------------*/
27685 
27686         /* CIRS RA,Dec to Cartesian -HA,Dec. */
27687         v = jauS2c(ri-astrom.eral, di);
27688         x = v[0];
27689         y = v[1];
27690         z = v[2];
27691 
27692         /* Polar motion. */
27693         xhd = x + astrom.xpl*z;
27694         yhd = y - astrom.ypl*z;
27695         zhd = z - astrom.xpl*x + astrom.ypl*y;
27696 
27697         /* Diurnal aberration. */
27698         f = ( 1.0 - astrom.diurab*yhd );
27699         xhdt = f * xhd;
27700         yhdt = f * ( yhd + astrom.diurab );
27701         zhdt = f * zhd;
27702 
27703         /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */
27704         xaet = astrom.sphi*xhdt - astrom.cphi*zhdt;
27705         yaet = yhdt;
27706         zaet = astrom.cphi*xhdt + astrom.sphi*zhdt;
27707 
27708         /* Azimuth (N=0,E=90). */
27709         azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0;
27710 
27711         /* ---------- */
27712         /* Refraction */
27713         /* ---------- */
27714 
27715         /* Cosine and sine of altitude, with precautions. */
27716         r = sqrt(xaet*xaet + yaet*yaet);
27717         r = r > CELMIN ? r : CELMIN;
27718         z = zaet > SELMIN ? zaet : SELMIN;
27719 
27720         /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */
27721         tz = r/z;
27722         w = astrom.refb*tz*tz;
27723         del = ( astrom.refa + w ) * tz /
27724                 ( 1.0 + ( astrom.refa + 3.0*w ) / ( z*z ) );
27725 
27726         /* Apply the change, giving observed vector. */
27727         cosdel = 1.0 - del*del/2.0;
27728         f = cosdel - del*z/r;
27729         xaeo = xaet*f;
27730         yaeo = yaet*f;
27731         zaeo = cosdel*zaet + del*r;
27732 
27733         /* Observed ZD. */
27734         zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo);
27735 
27736         /* Az/El vector to HA,Dec vector (both right-handed). */
27737         v[0] = astrom.sphi*xaeo + astrom.cphi*zaeo;
27738         v[1] = yaeo;
27739         v[2] = - astrom.cphi*xaeo + astrom.sphi*zaeo;
27740 
27741         /* To spherical -HA,Dec. */
27742         SphericalCoordinate co = jauC2s ( v);
27743         hmobs = co.alpha;
27744         dcobs = co.delta;
27745         /* Right ascension (with respect to CIO). */
27746         raobs = astrom.eral + hmobs;
27747 
27748         /* Return the results. */
27749         return new ObservedPosition(
27750         jauAnp(azobs),
27751         zdobs,
27752         -hmobs,
27753         dcobs,
27754         jauAnp(raobs));
27755 
27756         /* Finished. */
27757 
27758 
27759     }
27760 
27761     /**
27762      *  Observed place at a groundbased site to to ICRS astrometric RA,Dec.
27763      *  The caller supplies UTC, site coordinates, ambient air conditions
27764      *  and observing wavelength.
27765      *
27766      *<p>This function is derived from the International Astronomical Union's
27767      *  SOFA (Standards of Fundamental Astronomy) software collection.
27768      *
27769      *<p>Status:  support function.
27770      *
27771      *<!-- Given: -->
27772      *     @param type    char[]    type of coordinates - "R", "H" or "A" (Notes 1,2)
27773      *     @param ob1     double    observed Az, HA or RA (radians; Az is N=0,E=90)
27774      *     @param ob2     double    observed ZD or Dec (radians)
27775      *     @param utc1    double    UTC as a 2-part...
27776      *     @param utc2    double    ...quasi Julian Date (Notes 3,4)
27777      *     @param dut1    double    UT1-UTC (seconds, Note 5)
27778      *     @param elong   double    longitude (radians, east +ve, Note 6)
27779      *     @param phi     double    geodetic latitude (radians, Note 6)
27780      *     @param hm      double    height above ellipsoid (m, geodetic Notes 6,8)
27781      *     @param xp double    polar motion coordinates (radians, Note 7)
27782      *     @param yp double    polar motion coordinates (radians, Note 7) 
27783      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
27784      *     @param tc      double    ambient temperature at the observer (deg C)
27785      *     @param rh      double    relative humidity at the observer (range 0-1)
27786      *     @param wl      double    wavelength (micrometers, Note 9)
27787      *
27788      *<!-- Returned:-->
27789      *     @return rc,dc   double     <b>Returned</b> ICRS astrometric RA,Dec (radians)
27790      *
27791      *  @throws JSOFAInternalError
27792      *  @throws JSOFAIllegalParameter
27793      *                   int       status:   <b>Returned</b> +1 = dubious year (Note 4)
27794      *                               0  =   <b>Returned</b> OK
27795      *                              -1  =   <b>Returned</b> unacceptable date
27796      *
27797      *<p>Notes:
27798      * <ol>
27799      *
27800      *  <li> "Observed" Az,ZD means the position that would be seen by a
27801      *      perfect geodetically aligned theodolite.  (Zenith distance is
27802      *      used rather than altitude in order to reflect the fact that no
27803      *      allowance is made for depression of the horizon.)  This is
27804      *      related to the observed HA,Dec via the standard rotation, using
27805      *      the geodetic latitude (corrected for polar motion), while the
27806      *      observed HA and RA are related simply through the Earth rotation
27807      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27808      *      means the position that would be seen by a perfect equatorial
27809      *      with its polar axis aligned to the Earth's axis of rotation.
27810      *
27811      *  <li> Only the first character of the type argument is significant.
27812      *      "R" or "r" indicates that ob1 and ob2 are the observed right
27813      *      ascension and declination;  "H" or "h" indicates that they are
27814      *      hour angle (west +ve) and declination;  anything else ("A" or
27815      *      "a" is recommended) indicates that ob1 and ob2 are azimuth
27816      *      (north zero, east 90 deg) and zenith distance.
27817      *
27818      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27819      *      convenient way between the two arguments, for example where utc1
27820      *      is the Julian Day Number and utc2 is the fraction of a day.
27821      *
27822      *      <p>However, JD cannot unambiguously represent UTC during a leap
27823      *      second unless special measures are taken.  The convention in the
27824      *      present function is that the JD day represents UTC days whether
27825      *      the length is 86399, 86400 or 86401 SI seconds.
27826      *
27827      *      <p>Applications should use the function iauDtf2d to convert from
27828      *      calendar date and time of day into 2-part quasi Julian Date, as
27829      *      it implements the leap-second-ambiguity convention just
27830      *      described.
27831      *
27832      *  <li> The warning status "dubious year" flags UTCs that predate the
27833      *      introduction of the time scale or that are too far in the
27834      *      future to be trusted.  See iauDat for further details.
27835      *
27836      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
27837      *      one second at the end of each positive UTC leap second,
27838      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
27839      *      practice is under review, and in the future UT1-UTC may grow
27840      *      essentially without limit.
27841      *
27842      *  <li> The geographical coordinates are with respect to the WGS84
27843      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
27844      *      longitude required by the present function is east-positive
27845      *      (i.e. right-handed), in accordance with geographical convention.
27846      *
27847      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
27848      *      values are the coordinates (in radians) of the Celestial
27849      *      Intermediate Pole with respect to the International Terrestrial
27850      *      Reference System (see IERS Conventions 2003), measured along the
27851      *      meridians 0 and 90 deg west respectively.  For many
27852      *      applications, xp and yp can be set to zero.
27853      *
27854      *  <li> If hm, the height above the ellipsoid of the observing station
27855      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
27856      *      available, an adequate estimate of hm can be obtained from the
27857      *      expression
27858      *
27859      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27860      *
27861      *      <p>where tsl is the approximate sea-level air temperature in K
27862      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27863      *      52).  Similarly, if the pressure phpa is not known, it can be
27864      *      estimated from the height of the observing station, hm, as
27865      *      follows:
27866      *
27867      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27868      *
27869      *      <p>Note, however, that the refraction is nearly proportional to
27870      *      the pressure and that an accurate phpa value is important for
27871      *      precise work.
27872      *
27873      *  <li> The argument wl specifies the observing wavelength in
27874      *      micrometers.  The transition from optical to radio is assumed to
27875      *      occur at 100 micrometers (about 3000 GHz).
27876      *
27877      *  <li> The accuracy of the result is limited by the corrections for
27878      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27879      *      Providing the meteorological parameters are known accurately and
27880      *      there are no gross local effects, the predicted astrometric
27881      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27882      *      (radio) for a zenith distance of less than 70 degrees, better
27883      *      than 30 arcsec (optical or radio) at 85 degrees and better
27884      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27885      *
27886      *      <p>Without refraction, the complementary functions iauAtco13 and
27887      *      iauAtoc13 are self-consistent to better than 1 microarcsecond
27888      *      all over the celestial sphere.  With refraction included,
27889      *      consistency falls off at high zenith distances, but is still
27890      *      better than 0.05 arcsec at 85 degrees.
27891      *
27892      *  <li> It is advisable to take great care with units, as even unlikely
27893      *      values of the input parameters are accepted and processed in
27894      *      accordance with the models used.
27895      *
27896      * </ol>
27897      *  Called:
27898      * <ul>
27899      *     <li>{@link #jauApco13} astrometry parameters, ICRS-observed
27900      *     <li>{@link #jauAtoiq} quick observed to CIRS
27901      *     <li>{@link #jauAticq} quick CIRS to ICRS
27902      *
27903      * </ul>
27904      *@version  2013 October 9
27905      *
27906      *@since JSOFA release 20131202
27907      *
27908      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27909      * @throws JSOFAInternalError 
27910      * @throws JSOFAIllegalParameter 
27911      */
27912     public static SphericalCoordinate jauAtoc13(String type, double ob1, double ob2,
27913             double utc1, double utc2, double dut1,
27914             double elong, double phi, double hm, double xp, double yp,
27915             double phpa, double tc, double rh, double wl
27916             ) throws JSOFAIllegalParameter, JSOFAInternalError
27917     {
27918         Astrom astrom = new Astrom();
27919         jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27920                 phpa, tc, rh, wl, astrom);
27921 
27922         /* Transform observed to CIRS. */
27923         SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
27924 
27925         /* Transform CIRS to ICRS. */
27926         SphericalCoordinate icrs = jauAticq(co.alpha, co.delta, astrom);
27927         return icrs;
27928        
27929 
27930         /* Finished. */
27931 
27932 
27933     }
27934 
27935     /**
27936      *  Observed place to CIRS.  The caller supplies UTC, site coordinates,
27937      *  ambient air conditions and observing wavelength.
27938      *
27939      *<p>This function is derived from the International Astronomical Union's
27940      *  SOFA (Standards of Fundamental Astronomy) software collection.
27941      *
27942      *<p>Status:  support function.
27943      *
27944      *<!-- Given: -->
27945      *     @param type    char[]    type of coordinates - "R", "H" or "A" (Notes 1,2)
27946      *     @param ob1     double    observed Az, HA or RA (radians; Az is N=0,E=90)
27947      *     @param ob2     double    observed ZD or Dec (radians)
27948      *     @param utc1    double    UTC as a 2-part...
27949      *     @param utc2    double    ...quasi Julian Date (Notes 3,4)
27950      *     @param dut1    double    UT1-UTC (seconds, Note 5)
27951      *     @param elong   double    longitude (radians, east +ve, Note 6)
27952      *     @param phi     double    geodetic latitude (radians, Note 6)
27953      *     @param hm      double    height above the ellipsoid (meters, Notes 6,8)
27954      *     @param xp double    polar motion coordinates (radians, Note 7)
27955      *     @param yp double    polar motion coordinates (radians, Note 7) 
27956      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
27957      *     @param tc      double    ambient temperature at the observer (deg C)
27958      *     @param rh      double    relative humidity at the observer (range 0-1)
27959      *     @param wl      double    wavelength (micrometers, Note 9)
27960      *
27961      *<!-- Returned:-->
27962      *     @return ri      double*    <b>Returned</b> CIRS right ascension (CIO-based, radians)
27963      *             di      double*    <b>Returned</b> CIRS declination (radians)
27964      *
27965      *  @throws JSOFAInternalError
27966      *  @throws JSOFAIllegalParameter
27967      *             int       status:   <b>Returned</b> +1 = dubious year (Note 2)
27968      *                               0  =   <b>Returned</b> OK
27969      *                              -1  =   <b>Returned</b> unacceptable date
27970      *
27971      *<p>Notes:
27972      * <ol>
27973      *
27974      *  <li> "Observed" Az,ZD means the position that would be seen by a
27975      *      perfect geodetically aligned theodolite.  (Zenith distance is
27976      *      used rather than altitude in order to reflect the fact that no
27977      *      allowance is made for depression of the horizon.)  This is
27978      *      related to the observed HA,Dec via the standard rotation, using
27979      *      the geodetic latitude (corrected for polar motion), while the
27980      *      observed HA and RA are related simply through the Earth rotation
27981      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27982      *      means the position that would be seen by a perfect equatorial
27983      *      with its polar axis aligned to the Earth's axis of rotation.
27984      *
27985      *  <li> Only the first character of the type argument is significant.
27986      *      "R" or "r" indicates that ob1 and ob2 are the observed right
27987      *      ascension and declination;  "H" or "h" indicates that they are
27988      *      hour angle (west +ve) and declination;  anything else ("A" or
27989      *      "a" is recommended) indicates that ob1 and ob2 are azimuth
27990      *      (north zero, east 90 deg) and zenith distance.
27991      *
27992      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27993      *      convenient way between the two arguments, for example where utc1
27994      *      is the Julian Day Number and utc2 is the fraction of a day.
27995      *
27996      *      <p>However, JD cannot unambiguously represent UTC during a leap
27997      *      second unless special measures are taken.  The convention in the
27998      *      present function is that the JD day represents UTC days whether
27999      *      the length is 86399, 86400 or 86401 SI seconds.
28000      *
28001      *      <p>Applications should use the function iauDtf2d to convert from
28002      *      calendar date and time of day into 2-part quasi Julian Date, as
28003      *      it implements the leap-second-ambiguity convention just
28004      *      described.
28005      *
28006      *  <li> The warning status "dubious year" flags UTCs that predate the
28007      *      introduction of the time scale or that are too far in the
28008      *      future to be trusted.  See iauDat for further details.
28009      *
28010      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
28011      *      one second at the end of each positive UTC leap second,
28012      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
28013      *      practice is under review, and in the future UT1-UTC may grow
28014      *      essentially without limit.
28015      *
28016      *  <li> The geographical coordinates are with respect to the WGS84
28017      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
28018      *      longitude required by the present function is east-positive
28019      *      (i.e. right-handed), in accordance with geographical convention.
28020      *
28021      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
28022      *      values are the coordinates (in radians) of the Celestial
28023      *      Intermediate Pole with respect to the International Terrestrial
28024      *      Reference System (see IERS Conventions 2003), measured along the
28025      *      meridians 0 and 90 deg west respectively.  For many
28026      *      applications, xp and yp can be set to zero.
28027      *
28028      *  <li> If hm, the height above the ellipsoid of the observing station
28029      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
28030      *      available, an adequate estimate of hm can be obtained from the
28031      *      expression
28032      *
28033      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
28034      *
28035      *      <p>where tsl is the approximate sea-level air temperature in K
28036      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
28037      *      52).  Similarly, if the pressure phpa is not known, it can be
28038      *      estimated from the height of the observing station, hm, as
28039      *      follows:
28040      *
28041      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
28042      *
28043      *      <p>Note, however, that the refraction is nearly proportional to
28044      *      the pressure and that an accurate phpa value is important for
28045      *      precise work.
28046      *
28047      *  <li> The argument wl specifies the observing wavelength in
28048      *      micrometers.  The transition from optical to radio is assumed to
28049      *      occur at 100 micrometers (about 3000 GHz).
28050      *
28051      *  <li> The accuracy of the result is limited by the corrections for
28052      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28053      *      Providing the meteorological parameters are known accurately and
28054      *      there are no gross local effects, the predicted astrometric
28055      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28056      *      (radio) for a zenith distance of less than 70 degrees, better
28057      *      than 30 arcsec (optical or radio) at 85 degrees and better
28058      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28059      *
28060      *      <p>Without refraction, the complementary functions iauAtio13 and
28061      *      iauAtoi13 are self-consistent to better than 1 microarcsecond
28062      *      all over the celestial sphere.  With refraction included,
28063      *      consistency falls off at high zenith distances, but is still
28064      *      better than 0.05 arcsec at 85 degrees.
28065      *
28066      *  <li> It is advisable to take great care with units, as even unlikely
28067      *      values of the input parameters are accepted and processed in
28068      *      accordance with the models used.
28069      *
28070      * </ol>
28071      *  Called:
28072      * <ul>
28073      *     <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
28074      *     <li>{@link #jauAtoiq} quick observed to CIRS
28075      *
28076      * </ul>
28077      *@version  2013 October 9
28078      *
28079      *@since JSOFA release 20131202
28080      *
28081      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28082      * @throws JSOFAInternalError 
28083      * @throws JSOFAIllegalParameter 
28084      */
28085     public static SphericalCoordinate jauAtoi13(String type, double ob1, double ob2,
28086             double utc1, double utc2, double dut1,
28087             double elong, double phi, double hm, double xp, double yp,
28088             double phpa, double tc, double rh, double wl
28089             ) throws JSOFAIllegalParameter, JSOFAInternalError
28090     {
28091         Astrom astrom = new Astrom();
28092 
28093 
28094         /* Star-independent astrometry parameters for CIRS->observed. */
28095         jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
28096                 phpa, tc, rh, wl, astrom);
28097 
28098         /* Transform observed to CIRS. */
28099         SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
28100         return co;
28101         
28102         /* Finished. */
28103 
28104 
28105     }
28106 
28107     /**
28108      *  Quick observed place to CIRS, given the star-independent astrometry
28109      *  parameters.
28110      * 
28111      *  Use of this function is appropriate when efficiency is important and
28112      *  where many star positions are all to be transformed for one date.
28113      *  The star-independent astrometry parameters can be obtained by
28114      *  calling iauApio[13] or iauApco[13].
28115      *
28116      *<p>Status:  support function.
28117      *
28118      *<!-- Given: -->
28119      *     @param type    char[]      type of coordinates: "R", "H" or "A" (Note 1)
28120      *     @param ob1     double      observed Az, HA or RA (radians; Az is N=0,E=90)
28121      *     @param ob2     double      observed ZD or Dec (radians)
28122      *     @param astrom    star-independent astrometry parameters:
28123      *
28124      *<!-- Returned:-->
28125      *     @return ri      double*      <b>Returned</b> CIRS right ascension (CIO-based, radians)
28126      *             di      double*      <b>Returned</b> CIRS declination (radians)
28127      *
28128      *<p>Notes:
28129      * <ol>
28130      *
28131      *  <li> "Observed" Az,El means the position that would be seen by a
28132      *     perfect geodetically aligned theodolite.  This is related to
28133      *     the observed HA,Dec via the standard rotation, using the geodetic
28134      *     latitude (corrected for polar motion), while the observed HA and
28135      *     RA are related simply through the Earth rotation angle and the
28136      *     site longitude.  "Observed" RA,Dec or HA,Dec thus means the
28137      *     position that would be seen by a perfect equatorial with its
28138      *     polar axis aligned to the Earth's axis of rotation.  By removing
28139      *     from the observed place the effects of atmospheric refraction and
28140      *     diurnal aberration, the CIRS RA,Dec is obtained.
28141      *
28142      *  <li> Only the first character of the type argument is significant.
28143      *     "R" or "r" indicates that ob1 and ob2 are the observed right
28144      *     ascension and declination;  "H" or "h" indicates that they are
28145      *     hour angle (west +ve) and declination;  anything else ("A" or
28146      *     "a" is recommended) indicates that ob1 and ob2 are azimuth (north
28147      *     zero, east 90 deg) and zenith distance.  (Zenith distance is used
28148      *     rather than altitude in order to reflect the fact that no
28149      *     allowance is made for depression of the horizon.)
28150      *
28151      *  <li> The accuracy of the result is limited by the corrections for
28152      *     refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28153      *     Providing the meteorological parameters are known accurately and
28154      *     there are no gross local effects, the predicted observed
28155      *     coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28156      *     (radio) for a zenith distance of less than 70 degrees, better
28157      *     than 30 arcsec (optical or radio) at 85 degrees and better than
28158      *     20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28159      *
28160      *     <p>Without refraction, the complementary functions iauAtioq and
28161      *     iauAtoiq are self-consistent to better than 1 microarcsecond all
28162      *     over the celestial sphere.  With refraction included, consistency
28163      *     falls off at high zenith distances, but is still better than
28164      *     0.05 arcsec at 85 degrees.
28165      *
28166      *  <li> It is advisable to take great care with units, as even unlikely
28167      *     values of the input parameters are accepted and processed in
28168      *     accordance with the models used.
28169      *
28170      * </ol>
28171      *  Called:
28172      * <ul>
28173      *     <li>{@link #jauS2c} spherical coordinates to unit vector
28174      *     <li>{@link #jauC2s} p-vector to spherical
28175      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
28176      *
28177      * </ul>
28178      *@version  2013 October 9
28179      *
28180      *@since JSOFA release 20131202
28181      *
28182      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28183      */
28184     public static SphericalCoordinate jauAtoiq(String type,
28185             double ob1, double ob2, Astrom astrom
28186             )
28187     {
28188         char c;
28189         double c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, v[] = new double[3],
28190         xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref,
28191         zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda,
28192         f, xhd, yhd, zhd, xpl, ypl, w;
28193 
28194 
28195         /* Coordinate type. */
28196         c = type.charAt(0);
28197 
28198         /* Coordinates. */
28199         c1 = ob1;
28200         c2 = ob2;
28201 
28202         /* Sin, cos of latitude. */
28203         sphi = astrom.sphi;
28204         cphi = astrom.cphi;
28205 
28206         /* Standardize coordinate type. */
28207         if ( c == 'r' || c == 'R' ) {
28208             c = 'R';
28209         } else if ( c == 'h' || c == 'H' ) {
28210             c = 'H';
28211         } else {
28212             c = 'A';
28213         }
28214 
28215         /* If Az,ZD, convert to Cartesian (S=0,E=90). */
28216         if ( c == 'A' ) {
28217             ce = sin(c2);
28218             xaeo = - cos(c1) * ce;
28219             yaeo = sin(c1) * ce;
28220             zaeo = cos(c2);
28221 
28222         } else {
28223 
28224             /* If RA,Dec, convert to HA,Dec. */
28225             if ( c == 'R' ) c1 = astrom.eral - c1;
28226 
28227             /* To Cartesian -HA,Dec. */
28228             v = jauS2c ( -c1, c2 );
28229             xmhdo = v[0];
28230             ymhdo = v[1];
28231             zmhdo = v[2];
28232 
28233             /* To Cartesian Az,El (S=0,E=90). */
28234             xaeo = sphi*xmhdo - cphi*zmhdo;
28235             yaeo = ymhdo;
28236             zaeo = cphi*xmhdo + sphi*zmhdo;
28237         }
28238 
28239         /* Azimuth (S=0,E=90). */
28240         az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0;
28241 
28242         /* Sine of observed ZD, and observed ZD. */
28243         sz = sqrt ( xaeo*xaeo + yaeo*yaeo );
28244         zdo = atan2 ( sz, zaeo );
28245 
28246         /*
28247          * Refraction
28248          * ----------
28249          */
28250 
28251         /* Fast algorithm using two constant model. */
28252         refa = astrom.refa;
28253         refb = astrom.refb;
28254         tz = sz / zaeo;
28255         dref = ( refa + refb*tz*tz ) * tz;
28256         zdt = zdo + dref;
28257 
28258         /* To Cartesian Az,ZD. */
28259         ce = sin(zdt);
28260         xaet = cos(az) * ce;
28261         yaet = sin(az) * ce;
28262         zaet = cos(zdt);
28263 
28264         /* Cartesian Az,ZD to Cartesian -HA,Dec. */
28265         xmhda = sphi*xaet + cphi*zaet;
28266         ymhda = yaet;
28267         zmhda = - cphi*xaet + sphi*zaet;
28268 
28269         /* Diurnal aberration. */
28270         f = ( 1.0 + astrom.diurab*ymhda );
28271         xhd = f * xmhda;
28272         yhd = f * ( ymhda - astrom.diurab );
28273         zhd = f * zmhda;
28274 
28275         /* Polar motion. */
28276         xpl = astrom.xpl;
28277         ypl = astrom.ypl;
28278         w = xpl*xhd - ypl*yhd + zhd;
28279         v[0] = xhd - xpl*w;
28280         v[1] = yhd + ypl*w;
28281         v[2] = w - ( xpl*xpl + ypl*ypl ) * zhd;
28282 
28283         /* To spherical -HA,Dec. */
28284         SphericalCoordinate co = jauC2s(v);
28285 
28286         /* Right ascension. */
28287         co.alpha = jauAnp(astrom.eral + co.alpha);
28288 
28289         return co;
28290         /* Finished. */
28291 
28292 
28293     }
28294 
28295     /**
28296      *  Apply light deflection by a solar-system body, as part of
28297      *  transforming coordinate direction into natural direction.
28298      *
28299      *<p>This function is derived from the International Astronomical Union's
28300      *  SOFA (Standards of Fundamental Astronomy) software collection.
28301      *
28302      *<p>Status:  support function.
28303      *
28304      *<!-- Given: -->
28305      *     @param bm      double      mass of the gravitating body (solar masses)
28306      *     @param p       double[3]   direction from observer to source (unit vector)
28307      *     @param q       double[3]   direction from body to source (unit vector)
28308      *     @param e       double[3]   direction from body to observer (unit vector)
28309      *     @param em      double      distance from body to observer (au)
28310      *     @param dlim    double      deflection limiter (Note 4)
28311      *
28312      *<!-- Returned:-->
28313      *     @return p1      double[3]    <b>Returned</b> observer to deflected source (unit vector)
28314      *
28315      *<p>Notes:
28316      * <ol>
28317      *
28318      *  <li> The algorithm is based on Expr. (70) in Klioner (2003) and
28319      *     Expr. (7.63) in the Explanatory Supplement (Urban &amp; Seidelmann
28320      *     2013), with some rearrangement to minimize the effects of machine
28321      *     precision.
28322      *
28323      *  <li> The mass parameter bm can, as required, be adjusted in order to
28324      *     allow for such effects as quadrupole field.
28325      *
28326      *  <li> The barycentric position of the deflecting body should ideally
28327      *     correspond to the time of closest approach of the light ray to
28328      *     the body.
28329      *
28330      *  <li> The deflection limiter parameter dlim is phi^2/2, where phi is
28331      *     the angular separation (in radians) between source and body at
28332      *     which limiting is applied.  As phi shrinks below the chosen
28333      *     threshold, the deflection is artificially reduced, reaching zero
28334      *     for phi = 0.
28335      *
28336      *  <li> The returned vector p1 is not normalized, but the consequential
28337      *     departure from unit magnitude is always negligible.
28338      *
28339      *  <li> The arguments p and p1 can be the same array.
28340      *
28341      *  <li> To accumulate total light deflection taking into account the
28342      *     contributions from several bodies, call the present function for
28343      *     each body in succession, in decreasing order of distance from the
28344      *     observer.
28345      *
28346      *  <li> For efficiency, validation is omitted.  The supplied vectors must
28347      *     be of unit magnitude, and the deflection limiter non-zero and
28348      *     positive.
28349      *
28350      * </ol>
28351      *<p>References:
28352      * <ul>
28353      *
28354      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28355      *     the Astronomical Almanac, 3rd ed., University Science Books
28356      *     (2013).
28357      *
28358      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
28359      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
28360      *
28361      * </ul>
28362      *  Called:
28363      * <ul>
28364      *     <li>{@link #jauPdp} scalar product of two p-vectors
28365      *     <li>{@link #jauPxp} vector product of two p-vectors
28366      *
28367      * </ul>
28368      *@version  2013 October 9
28369      *
28370      *@since JSOFA release 20131202
28371      *
28372      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28373      */
28374     public static double[] jauLd(double bm, double p[], double q[], double e[],
28375             double em, double dlim)
28376     {
28377         int i;
28378         double qpe[] = new double[3], qdqpe, w, eq[], peq[] ;
28379 
28380         double p1[] = new double[3];
28381 
28382         /* q . (q + e). */
28383         for (i = 0; i < 3; i++) {
28384             qpe[i] = q[i] + e[i];
28385         }
28386         qdqpe = jauPdp(q, qpe);
28387 
28388         /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */
28389         w = bm * SRS / em / max(qdqpe,dlim);
28390 
28391         /* p x (e x q). */
28392         eq = jauPxp(e, q);
28393         peq = jauPxp(p, eq);
28394 
28395         /* Apply the deflection. */
28396         for (i = 0; i < 3; i++) {
28397             p1[i] = p[i] + w*peq[i];
28398         }
28399 
28400         return p1;
28401         /* Finished. */
28402 
28403 
28404     }
28405 
28406     /*+
28407      *  - - - - - - -
28408      *   i a u L d n
28409      *  - - - - - - -
28410      *
28411      *  For a star, apply light deflection by multiple solar-system bodies,
28412      *  as part of transforming coordinate direction into natural direction.
28413      *
28414      *<p>This function is derived from the International Astronomical Union's
28415      *  SOFA (Standards of Fundamental Astronomy) software collection.
28416      *
28417      *<p>Status:  support function.
28418      *
28419      *<!-- Given: -->
28420      *     n    int           number of bodies (note 1)
28421      *     b    jauLDBODY[n]  data for each of the n bodies (Notes 1,2):
28422      *      bm   double         mass of the body (solar masses, Note 3)
28423      *      dl   double         deflection limiter (Note 4)
28424      *      pv   [2][3]         barycentric PV of the body (au, au/day)
28425      *     ob   double[3]     barycentric position of the observer (au)
28426      *     sc   double[3]     observer to star coord direction (unit vector)
28427      *
28428      *<!-- Returned:-->
28429      *     sn    double[3]      observer to deflected star (unit vector)
28430      *
28431      *  <li> The array b contains n entries, one for each body to be
28432      *     considered.  If n = 0, no gravitational light deflection will be
28433      *     applied, not even for the Sun.
28434      *
28435      *  <li> The array b should include an entry for the Sun as well as for
28436      *     any planet or other body to be taken into account.  The entries
28437      *     should be in the order in which the light passes the body.
28438      *
28439      *  <li> In the entry in the b array for body i, the mass parameter
28440      *     b[i].bm can, as required, be adjusted in order to allow for such
28441      *     effects as quadrupole field.
28442      *
28443      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
28444      *     the angular separation (in radians) between star and body at
28445      *     which limiting is applied.  As phi shrinks below the chosen
28446      *     threshold, the deflection is artificially reduced, reaching zero
28447      *     for phi = 0.   Example values suitable for a terrestrial
28448      *     observer, together with masses, are as follows:
28449      *
28450      *        body i     b[i].bm        b[i].dl
28451      *
28452      *        Sun        1.0            6e-6
28453      *        Jupiter    0.00095435     3e-9
28454      *        Saturn     0.00028574     3e-10
28455      *
28456      *  <li> For cases where the starlight passes the body before reaching the
28457      *     observer, the body is placed back along its barycentric track by
28458      *     the light time from that point to the observer.  For cases where
28459      *     the body is "behind" the observer no such shift is applied.  If
28460      *     a different treatment is preferred, the user has the option of
28461      *     instead using the iauLd function.  Similarly, iauLd can be used
28462      *     for cases where the source is nearby, not a star.
28463      *
28464      *  <li> The returned vector sn is not normalized, but the consequential
28465      *     departure from unit magnitude is always negligible.
28466      *
28467      *  <li> The arguments sc and sn can be the same array.
28468      *
28469      *  <li> For efficiency, validation is omitted.  The supplied masses must
28470      *     be greater than zero, the position and velocity vectors must be
28471      *     right, and the deflection limiter greater than zero.
28472      *
28473      *  Reference:
28474      *
28475      *     Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28476      *     the Astronomical Almanac, 3rd ed., University Science Books
28477      *     (2013), Section 7.2.4.
28478      *
28479      *  Called:
28480      *     iauCp        copy p-vector
28481      *     iauPdp       scalar product of two p-vectors
28482      *     iauPmp       p-vector minus p-vector
28483      *     iauPpsp      p-vector plus scaled p-vector
28484      *     iauPn        decompose p-vector into modulus and direction
28485      *     iauLd        light deflection by a solar-system body
28486      *
28487      *@version  2013 October 9
28488      *
28489      *@since JSOFA release 20131202
28490      *
28491      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28492      */
28493     public static double[] jauLdn(int n, Ldbody b[], double ob[], double sc[])
28494     {
28495         /* Light time for 1 au (days) */
28496         final double CR = AULT/DAYSEC;
28497 
28498         int i;
28499         double v[] , dt, ev[], sn[] = new double[3];
28500 
28501 
28502         /* Star direction prior to deflection. */
28503         jauCp(sc, sn);
28504 
28505         /* Body by body. */
28506         for ( i = 0; i < n; i++ ) {
28507 
28508             /* Body to observer vector at epoch of observation (au). */
28509             v = jauPmp( ob, b[i].pv[0]);
28510 
28511             /* Minus the time since the light passed the body (days). */
28512             dt = jauPdp(sn,v) * CR;
28513 
28514             /* Neutralize if the star is "behind" the observer. */
28515             dt = min(dt, 0.0);
28516 
28517             /* Backtrack the body to the time the light was passing the body. */
28518             ev = jauPpsp(v, -dt, b[i].pv[1]);
28519 
28520             /* Body to observer vector as magnitude and direction. */
28521             NormalizedVector nv = jauPn(ev);
28522             
28523             /* Apply light deflection for this body. */
28524             sn = jauLd( b[i].bm, sn, sn, nv.u, nv.r, b[i].dl );
28525 
28526             /* Next body. */
28527         }
28528         return sn;
28529 
28530         /* Finished. */
28531 
28532 
28533     }
28534 
28535     /**
28536      *   Deflection of starlight by the Sun.
28537      *
28538      *<p>This function is derived from the International Astronomical Union's
28539      *  SOFA (Standards of Fundamental Astronomy) software collection.
28540      *
28541      *<p>Status:  support function.
28542      *
28543      *<!-- Given: -->
28544      *     @param p       double[3]   direction from observer to star (unit vector)
28545      *     @param e       double[3]   direction from Sun to observer (unit vector)
28546      *     @param em      double      distance from Sun to observer (au)
28547      *
28548      *<!-- Returned:-->
28549      *     @return p1      double[3]    <b>Returned</b> observer to deflected start (unit vector)
28550      *
28551      *<p>Notes:
28552      * <ol>
28553      *
28554      *  <li> The source is presumed to be sufficiently distant that its
28555      *     directions seen from the Sun and the observer are essentially
28556      *     the same.
28557      *
28558      *  <li> The deflection is restrained when the angle between the star and
28559      *     the center of the Sun is less than a threshold value, falling to
28560      *     zero deflection for zero separation.  The chosen threshold value
28561      *     is within the solar limb for all solar-system applications, and
28562      *     is about 5 arcminutes for the case of a terrestrial observer.
28563      *
28564      *  <li> The arguments p and p1 can be the same array.
28565      *
28566      * </ol>
28567      *  Called:
28568      * <ul>
28569      *     <li>{@link #jauLd} light deflection by a solar-system body
28570      *
28571      * </ul>
28572      *@version  2016 July 29
28573      *
28574      *@since JSOFA release 20131202
28575      *
28576      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28577      */
28578     public static double[] jauLdsun(double p[], double e[], double em)
28579     {
28580         double em2, dlim;
28581 
28582 
28583         /* Deflection limiter (smaller for distant observers). */
28584         em2 = em*em;
28585         if ( em2 < 1.0 ) em2 = 1.0;
28586         dlim = 1e-6 / (em2 > 1.0 ? em2 : 1.0);
28587         
28588         /* Apply the deflection. */
28589         return jauLd(1.0, p, p, e, em, dlim);
28590 
28591     }
28592 
28593     /**
28594      *  Proper motion and parallax.
28595      *
28596      *<p>This function is derived from the International Astronomical Union's
28597      *  SOFA (Standards of Fundamental Astronomy) software collection.
28598      *
28599      *<p>Status:  support function.
28600      *
28601      *<!-- Given: -->
28602      *     @param rc double      ICRS RA,Dec at catalog epoch (radians)
28603      *     @param dc double      ICRS RA,Dec at catalog epoch (radians) 
28604      *     @param pr      double      RA proper motion (radians/year; Note 1)
28605      *     @param pd      double      Dec proper motion (radians/year)
28606      *     @param px      double      parallax (arcsec)
28607      *     @param rv      double      radial velocity (km/s, +ve if receding)
28608      *     @param pmt     double      proper motion time interval (SSB, Julian years)
28609      *     @param pob     double[3]   SSB to observer vector (au)
28610      *
28611      *<!-- Returned:-->
28612      *     @return pco     double[3]    <b>Returned</b> coordinate direction (BCRS unit vector)
28613      *
28614      *<p>Notes:
28615      * <ol>
28616      *
28617      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
28618      *
28619      *  <li> The proper motion time interval is for when the starlight
28620      *     reaches the solar system barycenter.
28621      *
28622      *  <li> To avoid the need for iteration, the Roemer effect (i.e. the
28623      *     small annual modulation of the proper motion coming from the
28624      *     changing light time) is applied approximately, using the
28625      *     direction of the star at the catalog epoch.
28626      *
28627      * </ol>
28628      *<p>References:
28629      * <ul>
28630      *
28631      * <li> 1984 Astronomical Almanac, pp B39-B41.
28632      *
28633      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28634      *     the Astronomical Almanac, 3rd ed., University Science Books
28635      *     (2013), Section 7.2.
28636      *
28637      * </ul>
28638      *  Called:
28639      * <ul>
28640      *     <li>{@link #jauPdp} scalar product of two p-vectors
28641      *     <li>{@link #jauPn} decompose p-vector into modulus and direction
28642      *
28643      * </ul>
28644      *@version  2013 October 9
28645      *
28646      *@since JSOFA release 20131202
28647      *
28648      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28649      */
28650     public static double[] jauPmpx(double rc, double dc, double pr, double pd,
28651             double px, double rv, double pmt, double pob[]
28652             )
28653     {
28654         /* Km/s to au/year */
28655         final double VF = DAYSEC*DJM/DAU;
28656 
28657         /* Light time for 1 au, Julian years */
28658         final double AULTY = AULT/DAYSEC/DJY;
28659 
28660         int i;
28661         double sr, cr, sd, cd, x, y, z, p[] = new double[3], dt, pxr, w, pdz, pm[] = new double[3];
28662 
28663 
28664         /* Spherical coordinates to unit vector (and useful functions). */
28665         sr = sin(rc);
28666         cr = cos(rc);
28667         sd = sin(dc);
28668         cd = cos(dc);
28669         p[0] = x = cr*cd;
28670         p[1] = y = sr*cd;
28671         p[2] = z = sd;
28672 
28673         /* Proper motion time interval (y) including Roemer effect. */
28674         dt = pmt + jauPdp(p,pob)*AULTY;
28675 
28676         /* Space motion (radians per year). */
28677         pxr = px * DAS2R;
28678         w = VF * rv * pxr;
28679         pdz = pd * z;
28680         pm[0] = - pr*y - pdz*cr + w*x;
28681         pm[1] =   pr*x - pdz*sr + w*y;
28682         pm[2] =   pd*cd + w*z;
28683 
28684         /* Coordinate direction of star (unit vector, BCRS). */
28685         for (i = 0; i < 3; i++) {
28686             p[i] += dt*pm[i] - pxr*pob[i];
28687         }
28688         NormalizedVector pco = jauPn(p);
28689 
28690         return pco.u;
28691         /* Finished. */
28692 
28693 
28694     }
28695 
28696     /**
28697      *  Star proper motion:  update star catalog data for space motion, with
28698      *  special handling to handle the zero parallax case.
28699      *
28700      *<p>This function is derived from the International Astronomical Union's
28701      *  SOFA (Standards of Fundamental Astronomy) software collection.
28702      *
28703      *<p>Status:  support function.
28704      *
28705      *<!-- Given: -->
28706      *     @param ra1     double       right ascension (radians), before
28707      *     @param dec1    double       declination (radians), before
28708      *     @param pmr1    double       RA proper motion (radians/year), before
28709      *     @param pmd1    double       Dec proper motion (radians/year), before
28710      *     @param px1     double       parallax (arcseconds), before
28711      *     @param rv1     double       radial velocity (km/s, +ve = receding), before
28712      *     @param ep1a    double       "before" epoch, part A (Note 1)
28713      *     @param ep1b    double       "before" epoch, part B (Note 1)
28714      *     @param ep2a    double       "after" epoch, part A (Note 1)
28715      *     @param ep2b    double       "after" epoch, part B (Note 1)
28716      *
28717      *<!-- Returned:-->
28718      *     @return ra2     double        <b>Returned</b> right ascension (radians), after
28719      *             dec2    double        <b>Returned</b> declination (radians), after
28720      *             pmr2    double        <b>Returned</b> RA proper motion (radians/year), after
28721      *             pmd2    double        <b>Returned</b> Dec proper motion (radians/year), after
28722      *             px2     double        <b>Returned</b> parallax (arcseconds), after
28723      *             rv2     double        <b>Returned</b> radial velocity (km/s, +ve = receding), after
28724      *
28725      *  @throws JSOFAInternalError
28726      *            int         status:
28727      *                         -1  =   <b>Returned</b> system error (should not occur)
28728      *                          0  =   <b>Returned</b> no warnings or errors
28729      *                          1  =   <b>Returned</b> distance overridden (Note 6)
28730      *                          2  =   <b>Returned</b> excessive velocity (Note 7)
28731      *                          4  =   <b>Returned</b> solution didn't converge (Note 8)
28732      *                        else  =   <b>Returned</b> binary logical OR of the above warnings
28733      *
28734      *<p>Notes:
28735      * <ol>
28736      *
28737      *  <li> The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are
28738      *     Julian Dates, apportioned in any convenient way between the two
28739      *     parts (A and B).  For example, JD(TDB)=2450123.7 could be
28740      *     expressed in any of these ways, among others:
28741      *
28742      *            <p>epNa            epNb
28743      *
28744      *         2450123.7           0.0       (JD method)
28745      *         2451545.0       -1421.3       (J2000 method)
28746      *         2400000.5       50123.2       (MJD method)
28747      *         2450123.5           0.2       (date &amp; time method)
28748      *
28749      *     <p>The JD method is the most natural and convenient to use in cases
28750      *     where the loss of several decimal digits of resolution is
28751      *     acceptable.  The J2000 method is best matched to the way the
28752      *     argument is handled internally and will deliver the optimum
28753      *     resolution.  The MJD method and the date &amp; time methods are both
28754      *     good compromises between resolution and convenience.
28755      *
28756      *  <li> In accordance with normal star-catalog conventions, the object's
28757      *     right ascension and declination are freed from the effects of
28758      *     secular aberration.  The frame, which is aligned to the catalog
28759      *     equator and equinox, is Lorentzian and centered on the SSB.
28760      *
28761      *     <p>The proper motions are the rate of change of the right ascension
28762      *     and declination at the catalog epoch and are in radians per TDB
28763      *     Julian year.
28764      *
28765      *     <p>The parallax and radial velocity are in the same frame.
28766      *
28767      *  <li> Care is needed with units.  The star coordinates are in radians
28768      *     and the proper motions in radians per Julian year, but the
28769      *     parallax is in arcseconds.
28770      *
28771      *  <li> The RA proper motion is in terms of coordinate angle, not true
28772      *     angle.  If the catalog uses arcseconds for both RA and Dec proper
28773      *     motions, the RA proper motion will need to be divided by cos(Dec)
28774      *     before use.
28775      *
28776      *  <li> Straight-line motion at constant speed, in the inertial frame, is
28777      *     assumed.
28778      *
28779      *  <li> An extremely small (or zero or negative) parallax is overridden
28780      *     to ensure that the object is at a finite but very large distance,
28781      *     but not so large that the proper motion is equivalent to a large
28782      *     but safe speed (about 0.1c using the chosen constant).  A warning
28783      *     status of 1 is added to the status if this action has been taken.
28784      *
28785      *  <li> If the space velocity is a significant fraction of c (see the
28786      *     constant VMAX in the function iauStarpv), it is arbitrarily set
28787      *     to zero.  When this action occurs, 2 is added to the status.
28788      *
28789      *  <li> The relativistic adjustment carried out in the iauStarpv function
28790      *     involves an iterative calculation.  If the process fails to
28791      *     converge within a set number of iterations, 4 is added to the
28792      *     status.
28793      *
28794      * </ol>
28795      *  Called:
28796      * <ul>
28797      *     <li>{@link #jauSeps} angle between two points
28798      *     <li>{@link #jauStarpm} update star catalog data for space motion
28799      *
28800      * </ul>
28801      *@version  2013 October 9
28802      *
28803      *@since JSOFA release 20131202
28804      *
28805      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28806      * @throws JSOFAInternalError 
28807      */
28808     public static CatalogCoords jauPmsafe(double ra1, double dec1, double pmr1, double pmd1,
28809             double px1, double rv1,
28810             double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
28811     {
28812 
28813         /* Minimum allowed parallax (arcsec) */
28814         final double PXMIN = 5e-7;
28815 
28816         /* Factor giving maximum allowed transverse speed of about 1% c */
28817         final double F = 326.0;
28818 
28819         double pm, px1a;
28820 
28821 
28822         /* Proper motion in one year (radians). */
28823         pm = jauSeps(ra1, dec1, ra1+pmr1, dec1+pmd1);
28824 
28825         
28826         px1a = px1;
28827         pm *= F;
28828         if (px1a < pm) {px1a = pm;}
28829         if (px1a < PXMIN) {px1a = PXMIN;}
28830 
28831         /* Carry out the transformation using the modified parallax. */
28832         return jauStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1,
28833                 ep1a, ep1b, ep2a, ep2b);
28834 
28835          /* Finished. */
28836 
28837 
28838     }
28839 
28840     /**
28841      *  Position and velocity of a terrestrial observing station.
28842      *
28843      *<p>This function is derived from the International Astronomical Union's
28844      *  SOFA (Standards of Fundamental Astronomy) software collection.
28845      *
28846      *<p>Status:  support function.
28847      *
28848      *<!-- Given: -->
28849      *     @param elong    double        longitude (radians, east +ve, Note 1)
28850      *     @param phi      double        latitude (geodetic, radians, Note 1)
28851      *     @param hm       double        height above ref. ellipsoid (geodetic, m)
28852      *     @param xp double        coordinates of the pole (radians, Note 2)
28853      *     @param yp double        coordinates of the pole (radians, Note 2) 
28854      *     @param sp       double        the TIO locator s' (radians, Note 2)
28855      *     @param theta    double        Earth rotation angle (radians, Note 3)
28856      *
28857      *<!-- Returned:-->
28858      *     @return pv       double[2][3]   <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28859      *
28860      *<p>Notes:
28861      * <ol>
28862      *
28863      *  <li> The terrestrial coordinates are with respect to the WGS84
28864      *     reference ellipsoid.
28865      *
28866      *  <li> xp and yp are the coordinates (in radians) of the Celestial
28867      *     Intermediate Pole with respect to the International Terrestrial
28868      *     Reference System (see IERS Conventions), measured along the
28869      *     meridians 0 and 90 deg west respectively.  sp is the TIO locator
28870      *     s', in radians, which positions the Terrestrial Intermediate
28871      *     Origin on the equator.  For many applications, xp, yp and
28872      *     (especially) sp can be set to zero.
28873      *
28874      *  <li> If theta is Greenwich apparent sidereal time instead of Earth
28875      *     rotation angle, the result is with respect to the true equator
28876      *     and equinox of date, i.e. with the x-axis at the equinox rather
28877      *     than the celestial intermediate origin.
28878      *
28879      *  <li> The velocity units are meters per UT1 second, not per SI second.
28880      *     This is unlikely to have any practical consequences in the modern
28881      *     era.
28882      *
28883      *  <li> No validation is performed on the arguments.  Error cases that
28884      *     could lead to arithmetic exceptions are trapped by the iauGd2gc
28885      *     function, and the result set to zeros.
28886      *
28887      * </ol>
28888      *<p>References:
28889      * <ul>
28890      *
28891      * <li> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
28892      *     IERS Technical Note No. 32, BKG (2004)
28893      *
28894      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28895      *     the Astronomical Almanac, 3rd ed., University Science Books
28896      *     (2013), Section 7.4.3.3.
28897      *
28898      * </ul>
28899      *  Called:
28900      * <ul>
28901      *     <li>{@link #jauGd2gc} geodetic to geocentric transformation
28902      *     <li>{@link #jauPom00} polar motion matrix
28903      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
28904      *
28905      * </ul>
28906      *@version  2013 October 9
28907      *
28908      * @since JSOFA release 20131202
28909      *
28910      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28911      * @throws JSOFAInternalError 
28912      * @throws JSOFAIllegalParameter 
28913      */
28914     public static double [][] jauPvtob(double elong, double phi, double hm,
28915             double xp, double yp, double sp, double theta
28916             ) throws JSOFAIllegalParameter, JSOFAInternalError
28917     {
28918 
28919         double xyzm[];
28920 
28921         /* Geodetic to geocentric transformation (WGS84). */
28922         xyzm = jauGd2gc(1, elong, phi, hm);
28923 
28924         return jauPvtob(xyzm, xp, yp, sp, theta );
28925         /* Finished. */
28926 
28927 
28928     }
28929     
28930     /**
28931      * Alternative Position and velocity of a terrestrial observing station with observatory position already in cartesian.
28932      * @see JSOFA#jauPvtob(double, double, double, double, double, double, double) for more detail.
28933      * @param xyzm observatory geocentric position in metres.
28934      * @param xp double        coordinates of the pole (radians, Note 2)
28935      * @param yp double        coordinates of the pole (radians, Note 2) 
28936      * @param sp       double        the TIO locator s' (radians, Note 2)
28937      * @param theta    double        Earth rotation angle (radians, Note 3)
28938      * @return pv       double[2][3]   <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28939      * @throws JSOFAIllegalParameter
28940      * @throws JSOFAInternalError
28941      */
28942     public static double [][] jauPvtob(double xyzm[],
28943             double xp, double yp, double sp, double theta
28944             ) throws JSOFAIllegalParameter, JSOFAInternalError
28945     {
28946         /* Earth rotation rate in radians per UT1 second */
28947         final double OM = 1.00273781191135448 * D2PI / DAYSEC;
28948 
28949         double rpm[][], xyz[], x, y, z, s, c;
28950         double pv[][] = new double[2][3];
28951 
28952       
28953         /* Polar motion and TIO position. */
28954         rpm = jauPom00(xp, yp, sp);
28955         xyz = jauTrxp(rpm, xyzm);
28956         x = xyz[0];
28957         y = xyz[1];
28958         z = xyz[2];
28959 
28960         /* Functions of ERA. */
28961         s = sin(theta);
28962         c = cos(theta);
28963 
28964         /* Position. */
28965         pv[0][0] = c*x - s*y;
28966         pv[0][1] = s*x + c*y;
28967         pv[0][2] = z;
28968 
28969         /* Velocity. */
28970         pv[1][0] = OM * ( -s*x - c*y );
28971         pv[1][1] = OM * (  c*x - s*y );
28972         pv[1][2] = 0.0;
28973 
28974         return pv;
28975         /* Finished. */
28976 
28977 
28978     }
28979 
28980     /**
28981      * constants A and B in the atmospheric refraction model
28982      *  dZ = A tan Z + B tan^3 Z.
28983      *  .
28984      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
28985      * @version $Revision$ $date$
28986      */
28987     public static class RefCos {
28988         /**    refraction coefficient A  */
28989         public double    a ;
28990 
28991         /**    refraction coefficient B  */
28992         public double    b ;
28993         public RefCos(double a, double b) {
28994           this.a = a;
28995           this.b = b;
28996        }
28997        
28998    }
28999 
29000     /**
29001      *  Determine the constants A and B in the atmospheric refraction model
29002      *  dZ = A tan Z + B tan^3 Z.
29003      *
29004      *  Z is the "observed" zenith distance (i.e. affected by refraction)
29005      *  and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
29006      *  zenith distance.
29007      *
29008      *<p>This function is derived from the International Astronomical Union's
29009      *  SOFA (Standards of Fundamental Astronomy) software collection.
29010      *
29011      *<p>Status:  support function.
29012      *
29013      *<!-- Given: -->
29014      *    @param phpa    double     pressure at the observer (hPa = millibar)
29015      *    @param tc      double     ambient temperature at the observer (deg C)
29016      *    @param rh      double     relative humidity at the observer (range 0-1)
29017      *    @param wl      double     wavelength (micrometers)
29018      *
29019      *<!-- Returned:-->
29020      *    @return      <b>Returned</b> tan Z coefficient (radians)
29021      *                 <b>Returned</b> tan^3 Z coefficient (radians)
29022      *
29023      *<p>Notes:
29024      * <ol>
29025      *
29026      *  <li> The model balances speed and accuracy to give good results in
29027      *     applications where performance at low altitudes is not paramount.
29028      *     Performance is maintained across a range of conditions, and
29029      *     applies to both optical/IR and radio.
29030      *
29031      *  <li> The model omits the effects of (i) height above sea level (apart
29032      *     from the reduced pressure itself), (ii) latitude (i.e. the
29033      *     flattening of the Earth), (iii) variations in tropospheric lapse
29034      *     rate and (iv) dispersive effects in the radio.
29035      *
29036      *     <p>The model was tested using the following range of conditions:
29037      *
29038      *       <p>lapse rates 0.0055, 0.0065, 0.0075 deg/meter
29039      *       latitudes 0, 25, 50, 75 degrees
29040      *       heights 0, 2500, 5000 meters ASL
29041      *       pressures mean for height -10% to +5% in steps of 5%
29042      *       temperatures -10 deg to +20 deg with respect to 280 deg at SL
29043      *       relative humidity 0, 0.5, 1
29044      *       wavelengths 0.4, 0.6, ... 2 micron, + radio
29045      *       zenith distances 15, 45, 75 degrees
29046      *
29047      *     <p>The accuracy with respect to raytracing through a model
29048      *     atmosphere was as follows:
29049      *
29050      *                            <p>worst         RMS
29051      *
29052      *       <p>optical/IR           62 mas       8 mas
29053      *       radio               319 mas      49 mas
29054      *
29055      *     <p>For this particular set of conditions:
29056      *
29057      *       <p>lapse rate 0.0065 K/meter
29058      *       latitude 50 degrees
29059      *       sea level
29060      *       pressure 1005 mb
29061      *       temperature 280.15 K
29062      *       humidity 80%
29063      *       wavelength 5740 Angstroms
29064      *
29065      *     <p>the results were as follows:
29066      *
29067      *       <p>ZD       raytrace     iauRefco   Saastamoinen
29068      *
29069      *       10         10.27        10.27        10.27
29070      *       20         21.19        21.20        21.19
29071      *       30         33.61        33.61        33.60
29072      *       40         48.82        48.83        48.81
29073      *       45         58.16        58.18        58.16
29074      *       50         69.28        69.30        69.27
29075      *       55         82.97        82.99        82.95
29076      *       60        100.51       100.54       100.50
29077      *       65        124.23       124.26       124.20
29078      *       70        158.63       158.68       158.61
29079      *       72        177.32       177.37       177.31
29080      *       74        200.35       200.38       200.32
29081      *       76        229.45       229.43       229.42
29082      *       78        267.44       267.29       267.41
29083      *       80        319.13       318.55       319.10
29084      *
29085      *      <p>deg        arcsec       arcsec       arcsec
29086      *
29087      *     <p>The values for Saastamoinen's formula (which includes terms
29088      *     up to tan^5) are taken from Hohenkerk and Sinclair (1985).
29089      *
29090      *  <li> A wl value in the range 0-100 selects the optical/IR case and is
29091      *     wavelength in micrometers.  Any value outside this range selects
29092      *     the radio case.
29093      *
29094      *  <li> Outlandish input parameters are silently limited to
29095      *     mathematically safe values.  Zero pressure is permissible, and
29096      *     causes zeroes to be returned.
29097      *
29098      *  <li> The algorithm draws on several sources, as follows:
29099      *
29100      *     <p>a) The formula for the saturation vapour pressure of water as
29101      *        a function of temperature and temperature is taken from
29102      *        Equations (A4.5-A4.7) of Gill (1982).
29103      *
29104      *     <p>b) The formula for the water vapour pressure, given the
29105      *        saturation pressure and the relative humidity, is from
29106      *        Crane (1976), Equation (2.5.5).
29107      *
29108      *     <p>c) The refractivity of air is a function of temperature,
29109      *        total pressure, water-vapour pressure and, in the case
29110      *        of optical/IR, wavelength.  The formulae for the two cases are
29111      *        developed from Hohenkerk &amp; Sinclair (1985) and Rueger (2002).
29112      *
29113      *     <p>d) The formula for beta, the ratio of the scale height of the
29114      *        atmosphere to the geocentric distance of the observer, is
29115      *        an adaption of Equation (9) from Stone (1996).  The
29116      *        adaptations, arrived at empirically, consist of (i) a small
29117      *        adjustment to the coefficient and (ii) a humidity term for the
29118      *        radio case only.
29119      *
29120      *     <p>e) The formulae for the refraction constants as a function of
29121      *        n-1 and beta are from Green (1987), Equation (4.31).
29122      *
29123      * </ol>
29124      *<p>References:
29125      * <ul>
29126      *
29127      * <li> Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral
29128      *     Atmosphere", Methods of Experimental Physics: Astrophysics 12B,
29129      *     Academic Press, 1976.
29130      *
29131      * <li> Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press,
29132      *     1982.
29133      *
29134      * <li> Green, R.M., "Spherical Astronomy", Cambridge University Press,
29135      *     1987.
29136      *
29137      * <li> Hohenkerk, C.Y., &amp; Sinclair, A.T., NAO Technical Note No. 63,
29138      *     1985.
29139      *
29140      * <li> Rueger, J.M., "Refractive Index Formulae for Electronic Distance
29141      *     Measurement with Radio and Millimetre Waves", in Unisurv Report
29142      *     S-68, School of Surveying and Spatial Information Systems,
29143      *     University of New South Wales, Sydney, Australia, 2002.
29144      *
29145      * <li> Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996.
29146      *
29147      * </ul>
29148      *@version  2013 October 9
29149      *
29150      *@since JSOFA release 20131202
29151      *
29152      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
29153      */
29154     public static RefCos jauRefco(double phpa, double tc, double rh, double wl )
29155     {
29156         boolean optic;
29157         double p, t, r, w, ps, pw, tk, wlsq, gamma, beta;
29158 
29159 
29160         /* Decide whether optical/IR or radio case:  switch at 100 microns. */
29161         optic = ( wl <= 100.0 );
29162 
29163         /* Restrict parameters to safe values. */
29164         t = max ( tc, -150.0 );
29165         t = min ( t, 200.0 );
29166         p = max ( phpa, 0.0 );
29167         p = min ( p, 10000.0 );
29168         r = max ( rh, 0.0 );
29169         r = min ( r, 1.0 );
29170         w = max ( wl, 0.1 );
29171         w = min ( w, 1e6 );
29172 
29173         /* Water vapour pressure at the observer. */
29174         if ( p > 0.0 ) {
29175             ps = pow ( 10.0, ( 0.7859 + 0.03477*t ) /
29176                     ( 1.0 + 0.00412*t ) ) *
29177                     ( 1.0 + p * ( 4.5e-6 + 6e-10*t*t )  );
29178             pw = r * ps / ( 1.0 - (1.0-r)*ps/p );
29179         } else {
29180             pw = 0.0;
29181         }
29182 
29183         /* Refractive index minus 1 at the observer. */
29184         tk = t + 273.15;
29185         if ( optic ) {
29186             wlsq = w * w;
29187             gamma = ( ( 77.53484e-6 +
29188                     ( 4.39108e-7 + 3.666e-9/wlsq ) / wlsq ) * p
29189                     - 11.2684e-6*pw ) / tk;
29190         } else {
29191             gamma = ( 77.6890e-6*p - ( 6.3938e-6 - 0.375463/tk ) * pw ) / tk;
29192         }
29193 
29194         /* Formula for beta from Stone, with empirical adjustments. */
29195         beta = 4.4474e-6 * tk;
29196         if ( ! optic ) beta -= 0.0074 * pw * beta;
29197 
29198         /* Refraction constants from Green. */
29199         return new RefCos( gamma * ( 1.0 - beta ),
29200                - gamma * ( beta - gamma / 2.0 ));
29201 
29202         /* Finished. */
29203 
29204 
29205     }
29206  
29207     
29208     /**
29209     *  Transformation from Galactic Coordinates to ICRS.
29210     *
29211     *  This function is derived from the International Astronomical Union's
29212     *  SOFA (Standards of Fundamental Astronomy) software collection.
29213     *
29214     *  <p>Status:  support routine.
29215     *
29216     *  @param   dl     double      galactic longitude (radians)
29217     *  @param   db     double      galactic latitude (radians)
29218     *
29219     *  @return co ICRS right ascension, declination.
29220     *
29221     *  <p>Notes:<ol>
29222     *
29223     *  <li> The IAU 1958 system of Galactic coordinates was defined with
29224     *     respect to the now obsolete reference system FK4 B1950.0.  When
29225     *     interpreting the system in a modern context, several factors have
29226     *     to be taken into account:<ul>
29227     *
29228     *     <li> The inclusion in FK4 positions of the E-terms of aberration.
29229     *
29230     *     <li> The distortion of the FK4 proper motion system by differential
29231     *       Galactic rotation.
29232     *
29233     *     <li> The use of the B1950.0 equinox rather than the now-standard
29234     *       J2000.0.
29235     *
29236     *     <li> The frame bias between ICRS and the J2000.0 mean place system.
29237     *  </ul>
29238     *     The Hipparcos Catalogue (Perryman &amp; ESA 1997) provides a rotation
29239     *     matrix that transforms directly between ICRS and Galactic
29240     *     coordinates with the above factors taken into account.  The
29241     *     matrix is derived from three angles, namely the ICRS coordinates
29242     *     of the Galactic pole and the longitude of the ascending node of
29243     *     the galactic equator on the ICRS equator.  They are given in
29244     *     degrees to five decimal places and for canonical purposes are
29245     *     regarded as exact.  In the Hipparcos Catalogue the matrix
29246     *     elements are given to 10 decimal places (about 20 microarcsec).
29247     *     In the present SOFA function the matrix elements have been
29248     *     recomputed from the canonical three angles and are given to 30
29249     *     decimal places.
29250     *
29251     *  <li> The inverse transformation is performed by the function jauIcrs2g.
29252     *  </ol>
29253     *
29254     *  Reference:
29255     *     Perryman M.A.C. &amp; ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29256     *     catalogues.  Astrometric and photometric star catalogues
29257     *     derived from the ESA Hipparcos Space Astrometry Mission.  ESA
29258     *     Publications Division, Noordwijk, Netherlands.
29259     *
29260     *  @version  2015 March 02
29261     * 
29262     *
29263     *  @since JSOFA release 20150209
29264     *
29265     */
29266     public static SphericalCoordinate jauG2icrs ( double dl, double db)
29267     {
29268        double v1[], v2[];
29269 
29270     /*
29271     *  L2,B2 system of galactic coordinates in the form presented in the
29272     *  Hipparcos Catalogue.  In degrees:
29273     *
29274     *  P = 192.85948    right ascension of the Galactic north pole in ICRS
29275     *  Q =  27.12825    declination of the Galactic north pole in ICRS
29276     *  R =  32.93192    longitude of the ascending node of the Galactic
29277     *                   plane on the ICRS equator
29278     *
29279     *  ICRS to galactic rotation matrix, obtained by computing
29280     *  R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29281     */
29282        double r[][]  = new double[][]{ { -0.054875560416215368492398900454,
29283                             -0.873437090234885048760383168409,
29284                             -0.483835015548713226831774175116 },
29285                           { +0.494109427875583673525222371358,
29286                             -0.444829629960011178146614061616,
29287                             +0.746982244497218890527388004556 },
29288                           { -0.867666149019004701181616534570,
29289                             -0.198076373431201528180486091412,
29290                             +0.455983776175066922272100478348 } };
29291 
29292 
29293     /* Spherical to Cartesian. */
29294        v1 = jauS2c(dl, db);
29295 
29296     /* Galactic to ICRS. */
29297        v2 = jauTrxp(r, v1);
29298 
29299     /* Cartesian to spherical. */
29300        SphericalCoordinate co = jauC2s(v2);
29301 
29302     /* Express in conventional ranges. */
29303        co.alpha = jauAnp(co.alpha);
29304        co.delta = jauAnpm(co.delta);
29305 
29306     /* Finished. */
29307       return co;
29308     }
29309  
29310     
29311     
29312     /**
29313     *  Transformation from ICRS to Galactic Coordinates.
29314     *
29315     *  This function is derived from the International Astronomical Union's
29316     *  SOFA (Standards of Fundamental Astronomy) software collection.
29317     *
29318     *  <p>Status:  support routine.
29319     *
29320     *     @param dr     double      ICRS right ascension (radians)
29321     *     @param dd     double      ICRS declination (radians)
29322     *
29323     *  @return co galactic longitude (radians), galactic latitude (radians)
29324     *
29325     *  <p>Notes:<ol>
29326     *
29327     *  <li> The IAU 1958 system of Galactic coordinates was defined with
29328     *     respect to the now obsolete reference system FK4 B1950.0.  When
29329     *     interpreting the system in a modern context, several factors have
29330     *     to be taken into account:<ul>
29331     *
29332     *     <li> The inclusion in FK4 positions of the E-terms of aberration.
29333     *
29334     *     <li> The distortion of the FK4 proper motion system by differential
29335     *       Galactic rotation.
29336     *
29337     *     <li> The use of the B1950.0 equinox rather than the now-standard
29338     *       J2000.0.
29339     *
29340     *     <li> The frame bias between ICRS and the J2000.0 mean place system.
29341     *     </ul>
29342     *     The Hipparcos Catalogue (Perryman &amp; ESA 1997) provides a rotation
29343     *     matrix that transforms directly between ICRS and Galactic
29344     *     coordinates with the above factors taken into account.  The
29345     *     matrix is derived from three angles, namely the ICRS coordinates
29346     *     of the Galactic pole and the longitude of the ascending node of
29347     *     the galactic equator on the ICRS equator.  They are given in
29348     *     degrees to five decimal places and for canonical purposes are
29349     *     regarded as exact.  In the Hipparcos Catalogue the matrix
29350     *     elements are given to 10 decimal places (about 20 microarcsec).
29351     *     In the present SOFA function the matrix elements have been
29352     *     recomputed from the canonical three angles and are given to 30
29353     *     decimal places.
29354     *
29355     *  <li> The inverse transformation is performed by the function iauG2icrs.
29356     *  </ol>
29357     *  Reference:
29358     *     Perryman M.A.C. &amp; ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29359     *     catalogues.  Astrometric and photometric star catalogues
29360     *     derived from the ESA Hipparcos Space Astrometry Mission.  ESA
29361     *     Publications Division, Noordwijk, Netherlands.
29362     *
29363     *  @version   2015 January 20
29364     *
29365     *  @since JSOFA release 20150209
29366     *
29367     */
29368     public static SphericalCoordinate jauIcrs2g ( double dr, double dd )
29369     {
29370        double v1[], v2[];
29371 
29372     /*
29373     *  L2,B2 system of galactic coordinates in the form presented in the
29374     *  Hipparcos Catalogue.  In degrees:
29375     *
29376     *  P = 192.85948    right ascension of the Galactic north pole in ICRS
29377     *  Q =  27.12825    declination of the Galactic north pole in ICRS
29378     *  R =  32.93192    longitude of the ascending node of the Galactic
29379     *                   plane on the ICRS equator
29380     *
29381     *  ICRS to galactic rotation matrix, obtained by computing
29382     *  R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29383     */
29384        double r[][] = new double[][] { { -0.054875560416215368492398900454,
29385                             -0.873437090234885048760383168409,
29386                             -0.483835015548713226831774175116 },
29387                           { +0.494109427875583673525222371358,
29388                             -0.444829629960011178146614061616,
29389                             +0.746982244497218890527388004556 },
29390                           { -0.867666149019004701181616534570,
29391                             -0.198076373431201528180486091412,
29392                             +0.455983776175066922272100478348 } };
29393 
29394 
29395     /* Spherical to Cartesian. */
29396        v1 = jauS2c(dr, dd);
29397 
29398     /* ICRS to Galactic. */
29399        v2 = jauRxp(r, v1);
29400 
29401     /* Cartesian to spherical. */
29402        SphericalCoordinate co = jauC2s(v2);
29403 
29404     /* Express in conventional ranges. */
29405        co.alpha = jauAnp(co.alpha);
29406        co.delta = jauAnpm(co.delta);
29407        return co;
29408     }
29409 
29410 // 2016-05-03 additions below    
29411     
29412     /**
29413     *
29414     *  Transformation from ecliptic coordinates (mean equinox and ecliptic
29415     *  of date) to ICRS RA,Dec, using the IAU 2006 precession model.
29416     *
29417     * <p>This function is derived from the International Astronomical Union's
29418     *  SOFA (Standards of Fundamental Astronomy) software collection.
29419     *
29420     *  <p>Status:  support function.
29421     *
29422     *  <!-- Given: -->
29423     *     @param date1 double TT as a 2-part Julian date (Note 1)
29424     *     @param date2 double TT as a 2-part Julian date (Note 1) 
29425     *     @param dl double ecliptic longitude and latitude (radians)
29426     *     @param db double ecliptic longitude and latitude (radians) 
29427     *
29428     * <!-- Returned: -->
29429     *     @return      double ICRS right ascension and declination (radians)
29430     *
29431     *<ol>
29432     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29433     *     convenient way between the two arguments.  For example,
29434     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29435     *     among others:
29436     *
29437     *            date1          date2
29438     *
29439     *         2450123.7           0.0       (JD method)
29440     *         2451545.0       -1421.3       (J2000 method)
29441     *         2400000.5       50123.2       (MJD method)
29442     *         2450123.5           0.2       (date &amp; time method)
29443     *
29444     *     The JD method is the most natural and convenient to use in
29445     *     cases where the loss of several decimal digits of resolution
29446     *     is acceptable.  The J2000 method is best matched to the way
29447     *     the argument is handled internally and will deliver the
29448     *     optimum resolution.  The MJD method and the date &amp; time methods
29449     *     are both good compromises between resolution and convenience.
29450     *
29451     *  <li> No assumptions are made about whether the coordinates represent
29452     *     starlight and embody astrometric effects such as parallax or
29453     *     aberration.
29454     *
29455     *  <li> The transformation is approximately that from ecliptic longitude
29456     *     and latitude (mean equinox and ecliptic of date) to mean J2000.0
29457     *     right ascension and declination, with only frame bias (always
29458     *     less than 25 mas) to disturb this classical picture.
29459     *</ol>
29460     *  Called: <ul>
29461     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29462     *     <li>{@link #jauEcm06}     J2000.0 to ecliptic rotation matrix, IAU 2006
29463     *     <li>{@link #jauTrxp}      product of transpose of r-matrix and p-vector
29464     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29465     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29466     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29467     *</ul>
29468     *
29469     *   @version  2016 February 9
29470     *
29471     *  @since JSOFA release 20160503
29472     *
29473     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29474     */
29475     public static SphericalCoordinate jauEceq06(double date1, double date2, double dl, double db)
29476     {
29477 
29478 
29479     /* Spherical to Cartesian. */
29480        double v1[] = jauS2c(dl, db);
29481 
29482     /* Rotation matrix, ICRS equatorial to ecliptic. */
29483        double rm[][] = jauEcm06(date1, date2);
29484 
29485     /* The transformation from ecliptic to ICRS. */
29486        double v2[] = jauTrxp(rm, v1);
29487 
29488     /* Cartesian to spherical. */
29489        SphericalCoordinate co = jauC2s(v2);
29490 
29491     /* Express in conventional ranges. */
29492        co.alpha = jauAnp(co.alpha);
29493        co.delta = jauAnpm(co.delta);
29494 
29495        return co;
29496     }
29497 
29498     /**
29499     *
29500     *  ICRS equatorial to ecliptic rotation matrix, IAU 2006.
29501     *
29502     * <p>This function is derived from the International Astronomical Union's
29503     *  SOFA (Standards of Fundamental Astronomy) software collection.
29504     *
29505     *  <p>Status:  support function.
29506     *
29507     *  <!-- Given: -->
29508     *    @param date1 double         TT as a 2-part Julian date (Note 1)
29509     *    @param date2 double         TT as a 2-part Julian date (Note 1) 
29510     *
29511     * <!-- Returned: -->
29512     *     @return          double[3][3]   ICRS to ecliptic rotation matrix
29513     *
29514     *  <p>Notes: <ol>
29515     *
29516     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29517     *     convenient way between the two arguments.  For example,
29518     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29519     *     among others:
29520     *
29521     *            date1          date2
29522     *
29523     *         2450123.7           0.0       (JD method)
29524     *         2451545.0       -1421.3       (J2000 method)
29525     *         2400000.5       50123.2       (MJD method)
29526     *         2450123.5           0.2       (date &amp; time method)
29527     *
29528     *     The JD method is the most natural and convenient to use in
29529     *     cases where the loss of several decimal digits of resolution
29530     *     is acceptable.  The J2000 method is best matched to the way
29531     *     the argument is handled internally and will deliver the
29532     *     optimum resolution.  The MJD method and the date &amp; time methods
29533     *     are both good compromises between resolution and convenience.
29534     *
29535     *  <li> The matrix is in the sense
29536     *
29537     *        E_ep = rm x P_ICRS,
29538     *
29539     *     where P_ICRS is a vector with respect to ICRS right ascension
29540     *     and declination axes and E_ep is the same vector with respect to
29541     *     the (inertial) ecliptic and equinox of date.
29542     *
29543     *  <li> P_ICRS is a free vector, merely a direction, typically of unit
29544     *     magnitude, and not bound to any particular spatial origin, such
29545     *     as the Earth, Sun or SSB.  No assumptions are made about whether
29546     *     it represents starlight and embodies astrometric effects such as
29547     *     parallax or aberration.  The transformation is approximately that
29548     *     between mean J2000.0 right ascension and declination and ecliptic
29549     *     longitude and latitude, with only frame bias (always less than
29550     *     25 mas) to disturb this classical picture.
29551     *  </ol>
29552     *  Called: <ul>
29553     *     <li>{@link #jauObl06}     mean obliquity, IAU 2006
29554     *     <li>{@link #jauPmat06}    PB matrix, IAU 2006
29555     *     <li>{@link #jauIr}        initialize r-matrix to identity
29556     *     <li>{@link #jauRx}        rotate around X-axis
29557     *     <li>{@link #jauRxr}       product of two r-matrices
29558     *</ul>
29559     *
29560     *   @version  2015 December 11
29561     *
29562     *  @since JSOFA release 20160503
29563     *
29564     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29565     */
29566     public static double[][] jauEcm06(double date1, double date2)
29567     {
29568        double ob, e[][] = new double[3][3];
29569 
29570 
29571     /* Obliquity, IAU 2006. */
29572        ob = jauObl06(date1, date2);
29573 
29574     /* Precession-bias matrix, IAU 2006. */
29575        double bp[][] = jauPmat06(date1, date2);
29576 
29577     /* Equatorial of date to ecliptic matrix. */
29578        jauIr(e);
29579        jauRx(ob, e);
29580 
29581     /* ICRS to ecliptic coordinates rotation matrix, IAU 2006. */
29582        return jauRxr(e, bp);
29583 
29584     }
29585 
29586     /**
29587     *
29588     *  Transformation from ICRS equatorial coordinates to ecliptic
29589     *  coordinates (mean equinox and ecliptic of date) using IAU 2006
29590     *  precession model.
29591     *
29592     * <p>This function is derived from the International Astronomical Union's
29593     *  SOFA (Standards of Fundamental Astronomy) software collection.
29594     *
29595     *  <p>Status:  support function.
29596     *
29597     *  <!-- Given: -->
29598     *     @param date1 double TT as a 2-part Julian date (Note 1)
29599     *     @param date2 double TT as a 2-part Julian date (Note 1) 
29600     *     @param dr double ICRS right ascension and declination (radians)
29601     *     @param dd double ICRS right ascension and declination (radians) 
29602     *
29603     * <!-- Returned: -->
29604     *     @return      double ecliptic longitude and latitude (radians)
29605     *<ol>
29606     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29607     *     convenient way between the two arguments.  For example,
29608     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29609     *     among others:
29610     *
29611     *            date1          date2
29612     *
29613     *         2450123.7           0.0       (JD method)
29614     *         2451545.0       -1421.3       (J2000 method)
29615     *         2400000.5       50123.2       (MJD method)
29616     *         2450123.5           0.2       (date &amp; time method)
29617     *
29618     *     The JD method is the most natural and convenient to use in
29619     *     cases where the loss of several decimal digits of resolution
29620     *     is acceptable.  The J2000 method is best matched to the way
29621     *     the argument is handled internally and will deliver the
29622     *     optimum resolution.  The MJD method and the date &amp; time methods
29623     *     are both good compromises between resolution and convenience.
29624     *
29625     *  <li> No assumptions are made about whether the coordinates represent
29626     *     starlight and embody astrometric effects such as parallax or
29627     *     aberration.
29628     *
29629     *  <li> The transformation is approximately that from mean J2000.0 right
29630     *     ascension and declination to ecliptic longitude and latitude
29631     *     (mean equinox and ecliptic of date), with only frame bias (always
29632     *     less than 25 mas) to disturb this classical picture.
29633     *</ol>
29634     *  Called:<ul>
29635     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29636     *     <li>{@link #jauEcm06}     J2000.0 to ecliptic rotation matrix, IAU 2006
29637     *     <li>{@link #jauRxp}       product of r-matrix and p-vector
29638     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29639     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29640     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29641     *</ul>
29642     *   @version  2016 February 9
29643     *
29644     *  @since JSOFA release 20160503
29645     *
29646     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29647     */
29648     public static SphericalCoordinate jauEqec06(double date1, double date2, double dr, double dd)
29649     {
29650 
29651     /* Spherical to Cartesian. */
29652       double v1[] = jauS2c(dr, dd);
29653 
29654     /* Rotation matrix, ICRS equatorial to ecliptic. */
29655       double rm[][] = jauEcm06(date1, date2);
29656 
29657     /* The transformation from ICRS to ecliptic. */
29658        double v2[] = jauRxp(rm, v1);
29659 
29660     /* Cartesian to spherical. */
29661        SphericalCoordinate co = jauC2s(v2);
29662 
29663     /* Express in conventional ranges. */
29664        co.alpha = jauAnp(co.alpha);
29665        co.delta = jauAnpm(co.delta);
29666        return co;
29667 
29668     }
29669 
29670     /**
29671     *
29672     *  Transformation from ecliptic coordinates (mean equinox and ecliptic
29673     *  of date) to ICRS RA,Dec, using a long-term precession model.
29674     *
29675     * <p>This function is derived from the International Astronomical Union's
29676     *  SOFA (Standards of Fundamental Astronomy) software collection.
29677     *
29678     *  <p>Status:  support function.
29679     *
29680     *  <!-- Given: -->
29681     *    @param  epj     double     Julian epoch (TT)
29682     *    @param dl double     ecliptic longitude and latitude (radians)
29683     *    @param db double     ecliptic longitude and latitude (radians) 
29684     *
29685     * <!-- Returned: -->
29686     *     @return   double     ICRS right ascension and declination (radians)
29687     *<ol>
29688     *  <li> No assumptions are made about whether the coordinates represent
29689     *     starlight and embody astrometric effects such as parallax or
29690     *     aberration.
29691     *
29692     *  <li> The transformation is approximately that from ecliptic longitude
29693     *     and latitude (mean equinox and ecliptic of date) to mean J2000.0
29694     *     right ascension and declination, with only frame bias (always
29695     *     less than 25 mas) to disturb this classical picture.
29696     *
29697     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29698     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29699     *     100 microarcseconds during the 20th and 21st centuries.  It is
29700     *     accurate to a few arcseconds throughout the historical period,
29701     *     worsening to a few tenths of a degree at the end of the
29702     *     +/- 200,000 year time span.
29703     *</ol>
29704     *  Called:<ul>
29705     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29706     *     <li>{@link #jauLtecm}     J2000.0 to ecliptic rotation matrix, long term
29707     *     <li>{@link #jauTrxp}      product of transpose of r-matrix and p-vector
29708     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29709     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29710     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29711     *</ul>
29712     *  References: <ul>
29713     *
29714     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29715     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29716     *    A22
29717     *
29718     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29719     *    expressions, valid for long time intervals (Corrigendum),
29720     *    Astron.Astrophys. 541, C1
29721     *</ul>
29722     *   @version  2016 February 9
29723     *
29724     *  @since JSOFA release 20160503
29725     *
29726     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29727     */
29728     public static SphericalCoordinate jauLteceq(double epj, double dl, double db)
29729     {
29730 
29731     /* Spherical to Cartesian. */
29732        double v1[] = jauS2c(dl, db);
29733 
29734     /* Rotation matrix, ICRS equatorial to ecliptic. */
29735        double rm[][] = jauLtecm(epj);
29736 
29737     /* The transformation from ecliptic to ICRS. */
29738        double v2[] = jauTrxp(rm, v1);
29739 
29740     /* Cartesian to spherical. */
29741        SphericalCoordinate co = jauC2s(v2);
29742 
29743     /* Express in conventional ranges. */
29744        co.alpha = jauAnp(co.alpha);
29745        co.delta = jauAnpm(co.delta);
29746        return co;
29747 
29748     }
29749 
29750     /**
29751     *
29752     *  ICRS equatorial to ecliptic rotation matrix, long-term.
29753     *
29754     * <p>This function is derived from the International Astronomical Union's
29755     *  SOFA (Standards of Fundamental Astronomy) software collection.
29756     *
29757     *  <p>Status:  support function.
29758     *
29759     *  <!-- Given: -->
29760     *     @param epj     double         Julian epoch (TT)
29761     *
29762     * <!-- Returned: -->
29763     *     @return      double[3][3]   ICRS to ecliptic rotation matrix
29764     *
29765     *  <p>Notes: <ol>
29766     *
29767     *  <li> The matrix is in the sense
29768     *
29769     *        E_ep = rm x P_ICRS,
29770     *
29771     *     where P_ICRS is a vector with respect to ICRS right ascension
29772     *     and declination axes and E_ep is the same vector with respect to
29773     *     the (inertial) ecliptic and equinox of epoch epj.
29774     *
29775     *  <li> P_ICRS is a free vector, merely a direction, typically of unit
29776     *     magnitude, and not bound to any particular spatial origin, such
29777     *     as the Earth, Sun or SSB.  No assumptions are made about whether
29778     *     it represents starlight and embodies astrometric effects such as
29779     *     parallax or aberration.  The transformation is approximately that
29780     *     between mean J2000.0 right ascension and declination and ecliptic
29781     *     longitude and latitude, with only frame bias (always less than
29782     *     25 mas) to disturb this classical picture.
29783     *
29784     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29785     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29786     *     100 microarcseconds during the 20th and 21st centuries.  It is
29787     *     accurate to a few arcseconds throughout the historical period,
29788     *     worsening to a few tenths of a degree at the end of the
29789     *     +/- 200,000 year time span.
29790     *</ol>
29791     *  Called:<ul>
29792     *     <li>{@link #jauLtpequ}    equator pole, long term
29793     *     <li>{@link #jauLtpecl}    ecliptic pole, long term
29794     *     <li>{@link #jauPxp}       vector product
29795     *     <li>{@link #jauPn}        normalize vector
29796     *</ul>
29797     *  References:<ul>
29798     *
29799     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29800     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29801     *    A22
29802     *
29803     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29804     *    expressions, valid for long time intervals (Corrigendum),
29805     *    Astron.Astrophys. 541, C1
29806     *</ul>
29807     *   @version  2015 December 6
29808     *
29809     *  @since JSOFA release 20160503
29810     *
29811     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29812     */
29813     public static double[][] jauLtecm(double epj)
29814     {
29815        double rm[][] = new double[3][3];
29816     /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
29817        final double dx = -0.016617 * DAS2R,
29818                     de = -0.0068192 * DAS2R,
29819                     dr = -0.0146 * DAS2R;
29820 
29821 
29822     /* Equator pole. */
29823        double p[] = jauLtpequ(epj);
29824 
29825     /* Ecliptic pole (bottom row of equatorial to ecliptic matrix). */
29826        double z[] = jauLtpecl(epj);
29827 
29828     /* Equinox (top row of matrix). */
29829        double w[] = jauPxp(p, z);
29830        NormalizedVector nv = jauPn(w);
29831 
29832        double x[] = nv.u;
29833     /* Middle row of matrix. */
29834        double y[] = jauPxp(z, x);
29835 
29836     /* Combine with frame bias. */
29837        rm[0][0] =   x[0]    - x[1]*dr + x[2]*dx;
29838        rm[0][1] =   x[0]*dr + x[1]    + x[2]*de;
29839        rm[0][2] = - x[0]*dx - x[1]*de + x[2];
29840        rm[1][0] =   y[0]    - y[1]*dr + y[2]*dx;
29841        rm[1][1] =   y[0]*dr + y[1]    + y[2]*de;
29842        rm[1][2] = - y[0]*dx - y[1]*de + y[2];
29843        rm[2][0] =   z[0]    - z[1]*dr + z[2]*dx;
29844        rm[2][1] =   z[0]*dr + z[1]    + z[2]*de;
29845        rm[2][2] = - z[0]*dx - z[1]*de + z[2];
29846 
29847        return rm;
29848 
29849     }
29850 
29851     /**
29852     *
29853     *  Transformation from ICRS equatorial coordinates to ecliptic
29854     *  coordinates (mean equinox and ecliptic of date) using a long-term
29855     *  precession model.
29856     *
29857     * <p>This function is derived from the International Astronomical Union's
29858     *  SOFA (Standards of Fundamental Astronomy) software collection.
29859     *
29860     *  <p>Status:  support function.
29861     *
29862     *  <!-- Given: -->
29863     *     @param epj     double     Julian epoch (TT)
29864     *     @param dr,dd   double     ICRS right ascension and declination (radians)
29865     *
29866     * <!-- Returned: -->
29867     *     @return     ecliptic longitude and latitude (radians)
29868     *<ol>
29869     *  <li> No assumptions are made about whether the coordinates represent
29870     *     starlight and embody astrometric effects such as parallax or
29871     *     aberration.
29872     *
29873     *  <li> The transformation is approximately that from mean J2000.0 right
29874     *     ascension and declination to ecliptic longitude and latitude
29875     *     (mean equinox and ecliptic of date), with only frame bias (always
29876     *     less than 25 mas) to disturb this classical picture.
29877     *
29878     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29879     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29880     *     100 microarcseconds during the 20th and 21st centuries.  It is
29881     *     accurate to a few arcseconds throughout the historical period,
29882     *     worsening to a few tenths of a degree at the end of the
29883     *     +/- 200,000 year time span.
29884     *</ol>
29885     *  Called:<ul>
29886     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29887     *     <li>{@link #jauLtecm}     J2000.0 to ecliptic rotation matrix, long term
29888     *     <li>{@link #jauRxp}       product of r-matrix and p-vector
29889     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29890     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29891     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29892     *</ul>
29893     *  References:
29894     *
29895     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29896     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29897     *    A22
29898     *
29899     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29900     *    expressions, valid for long time intervals (Corrigendum),
29901     *    Astron.Astrophys. 541, C1
29902     *
29903     *   @version  2016 February 9
29904     *
29905     *  @since JSOFA release 20160503
29906     *
29907     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29908     */
29909     public static SphericalCoordinate jauLteqec(double epj, double dr, double dd)
29910     {
29911 
29912     /* Spherical to Cartesian. */
29913        double v1[] = jauS2c(dr, dd);
29914 
29915     /* Rotation matrix, ICRS equatorial to ecliptic. */
29916        double rm[][] = jauLtecm(epj);
29917 
29918     /* The transformation from ICRS to ecliptic. */
29919        double v2[] = jauRxp(rm, v1);
29920 
29921     /* Cartesian to spherical. */
29922        SphericalCoordinate co = jauC2s(v2);
29923 
29924     /* Express in conventional ranges. */
29925       co.alpha = jauAnp(co.alpha);
29926       co.delta = jauAnpm(co.delta);
29927 
29928      return co;
29929     }
29930 
29931     /**
29932     *
29933     *  Long-term precession matrix.
29934     *
29935     * <p>This function is derived from the International Astronomical Union's
29936     *  SOFA (Standards of Fundamental Astronomy) software collection.
29937     *
29938     *  <p>Status:  support function.
29939     *
29940     *  <!-- Given: -->
29941     *     @param epj     double         Julian epoch (TT)
29942     *
29943     * <!-- Returned: -->
29944     *     @return      double[3][3]   precession matrix, J2000.0 to date
29945     *
29946     *  <p>Notes: <ol>
29947     *
29948     *  <li> The matrix is in the sense
29949     *
29950     *        P_date = rp x P_J2000,
29951     *
29952     *     where P_J2000 is a vector with respect to the J2000.0 mean
29953     *     equator and equinox and P_date is the same vector with respect to
29954     *     the equator and equinox of epoch epj.
29955     *
29956     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29957     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29958     *     100 microarcseconds during the 20th and 21st centuries.  It is
29959     *     accurate to a few arcseconds throughout the historical period,
29960     *     worsening to a few tenths of a degree at the end of the
29961     *     +/- 200,000 year time span.
29962     *</ol>
29963     *  Called:<ul>
29964     *     <li>{@link #jauLtpequ}    equator pole, long term
29965     *     <li>{@link #jauLtpecl}    ecliptic pole, long term
29966     *     <li>{@link #jauPxp}       vector product
29967     *     <li>{@link #jauPn}        normalize vector
29968     *</ul>
29969     *  References:
29970     *
29971     *    <p>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29972     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29973     *    A22
29974     *
29975     *    <p>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29976     *    expressions, valid for long time intervals (Corrigendum),
29977     *    Astron.Astrophys. 541, C1
29978     *
29979     *   @version  2015 December 6
29980     *
29981     *  @since JSOFA release 20160503
29982     *
29983     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29984     */
29985     public static double[][] jauLtp(double epj )
29986     {
29987        double rp[][] = new double[3][3];
29988        int i;
29989        
29990 
29991 
29992     /* Equator pole (bottom row of matrix). */
29993        double peqr[] = jauLtpequ(epj);
29994 
29995     /* Ecliptic pole. */
29996        double pecl[] = jauLtpecl(epj);
29997 
29998     /* Equinox (top row of matrix). */
29999        double v[] = jauPxp(peqr, pecl);
30000        NormalizedVector nv = jauPn(v);
30001 
30002     /* Middle row of matrix. */
30003        v = jauPxp(peqr, nv.u);
30004 
30005     /* Assemble the matrix. */
30006        for ( i = 0; i < 3; i++ ) {
30007           rp[0][i] = nv.u[i];
30008           rp[1][i] = v[i];
30009           rp[2][i] = peqr[i];
30010        }
30011 
30012        return rp;
30013     }
30014 
30015 
30016     /**
30017     *
30018     *  Long-term precession matrix, including ICRS frame bias.
30019     *
30020     * <p>This function is derived from the International Astronomical Union's
30021     *  SOFA (Standards of Fundamental Astronomy) software collection.
30022     *
30023     *  <p>Status:  support function.
30024     *
30025     *  <!-- Given: -->
30026     *     @param epj     double         Julian epoch (TT)
30027     *
30028     * <!-- Returned: -->
30029     *     @return     double[3][3]   precession-bias matrix, J2000.0 to date
30030     *
30031     *  <p>Notes: <ol>
30032     *
30033     *  <li> The matrix is in the sense
30034     *
30035     *        P_date = rpb x P_ICRS,
30036     *
30037     *     where P_ICRS is a vector in the Geocentric Celestial Reference
30038     *     System, and P_date is the vector with respect to the Celestial
30039     *     Intermediate Reference System at that date but with nutation
30040     *     neglected.
30041     *
30042     *  <li> A first order frame bias formulation is used, of sub-
30043     *     microarcsecond accuracy compared with a full 3D rotation.
30044     *
30045     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30046     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30047     *     100 microarcseconds during the 20th and 21st centuries.  It is
30048     *     accurate to a few arcseconds throughout the historical period,
30049     *     worsening to a few tenths of a degree at the end of the
30050     *     +/- 200,000 year time span.
30051     *</ol>
30052     *  References:
30053     *
30054     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30055     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30056     *    A22
30057     *
30058     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30059     *    expressions, valid for long time intervals (Corrigendum),
30060     *    Astron.Astrophys. 541, C1
30061     *
30062     *   @version  2015 December 6
30063     *
30064     *  @since JSOFA release 20160503
30065     *
30066     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30067     */
30068     public static double[][] jauLtpb(double epj)
30069     {
30070         double rpb[][] = new double[3][3];
30071     /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
30072        final double dx = -0.016617 * DAS2R,
30073                     de = -0.0068192 * DAS2R,
30074                     dr = -0.0146 * DAS2R;
30075 
30076        int i;
30077       
30078 
30079 
30080     /* Precession matrix. */
30081         double rp[][] = jauLtp(epj);
30082 
30083     /* Apply the bias. */
30084        for ( i = 0; i < 3; i++ ) {
30085           rpb[i][0] =  rp[i][0]    - rp[i][1]*dr + rp[i][2]*dx;
30086           rpb[i][1] =  rp[i][0]*dr + rp[i][1]    + rp[i][2]*de;
30087           rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2];
30088        }
30089 
30090       return rpb;
30091     }
30092 
30093     /**
30094     *
30095     *  Long-term precession of the ecliptic.
30096     *
30097     * <p>This function is derived from the International Astronomical Union's
30098     *  SOFA (Standards of Fundamental Astronomy) software collection.
30099     *
30100     *  <p>Status:  support function.
30101     *
30102     *  <!-- Given: -->
30103     *     @param epj     double         Julian epoch (TT)
30104     *
30105     * <!-- Returned: -->
30106     *     @return     double[3]      ecliptic pole unit vector
30107     *
30108     *  <p>Notes: <ol>
30109     *
30110     *  <li> The returned vector is with respect to the J2000.0 mean equator
30111     *     and equinox.
30112     *
30113     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30114     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30115     *     100 microarcseconds during the 20th and 21st centuries.  It is
30116     *     accurate to a few arcseconds throughout the historical period,
30117     *     worsening to a few tenths of a degree at the end of the
30118     *     +/- 200,000 year time span.
30119     *</ol>
30120     *  References:
30121     *
30122     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30123     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30124     *    A22
30125     *
30126     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30127     *    expressions, valid for long time intervals (Corrigendum),
30128     *    Astron.Astrophys. 541, C1
30129     *
30130     *   @version  2016 February 9
30131     *
30132     *  @since JSOFA release 20160503
30133     *
30134     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30135     */
30136     public static double[] jauLtpecl(double epj)
30137     {
30138         
30139        double vec[] = new double[3];
30140     /* Obliquity at J2000.0 (radians). */
30141        final double eps0 = 84381.406 * DAS2R;
30142 
30143     /* Polynomial coefficients */
30144         final int NPOL = 4 ;
30145         final double pqpol[][] = {
30146           { 5851.607687,
30147               -0.1189000,
30148               -0.00028913,
30149                0.000000101},
30150           {-1600.886300,
30151                1.1689818,
30152               -0.00000020,
30153               -0.000000437}
30154        };
30155 
30156     /* Periodic coefficients */
30157        final double pqper[][] = {
30158           { 708.15,-5486.751211,-684.661560,  667.666730,-5523.863691},
30159           {2309.00,  -17.127623,2446.283880,-2354.886252, -549.747450},
30160           {1620.00, -617.517403, 399.671049, -428.152441, -310.998056},
30161           { 492.20,  413.442940,-356.652376,  376.202861,  421.535876},
30162           {1183.00,   78.614193,-186.387003,  184.778874,  -36.776172},
30163           { 622.00, -180.732815,-316.800070,  335.321713, -145.278396},
30164           { 882.00,  -87.676083, 198.296701, -185.138669,  -34.744450},
30165           { 547.00,   46.140315, 101.135679, -120.972830,   22.885731}
30166        };
30167        final int NPER = pqper.length;
30168 
30169     /* Miscellaneous */
30170        int i;
30171        double t, p, q, w, a, s, c;
30172 
30173 
30174     /* Centuries since J2000. */
30175        t  = ( epj - 2000.0 ) / 100.0;
30176 
30177     /* Initialize P_A and Q_A accumulators. */
30178        p = 0.0;
30179        q = 0.0;
30180 
30181     /* Periodic terms. */
30182        w = D2PI*t;
30183        for ( i = 0; i < NPER; i++ ) {
30184           a = w/pqper[i][0];
30185           s = sin(a);
30186           c = cos(a);
30187           p += c*pqper[i][1] + s*pqper[i][3];
30188           q += c*pqper[i][2] + s*pqper[i][4];
30189        }
30190 
30191     /* Polynomial terms. */
30192        w = 1.0;
30193        for ( i = 0; i < NPOL; i++ ) {
30194           p += pqpol[0][i]*w;
30195           q += pqpol[1][i]*w;
30196           w *= t;
30197        }
30198 
30199     /* P_A and Q_A (radians). */
30200        p *= DAS2R;
30201        q *= DAS2R;
30202 
30203     /* Form the ecliptic pole vector. */
30204        w = 1.0 - p*p - q*q;
30205        w = w < 0.0 ? 0.0 : sqrt(w);
30206        s = sin(eps0);
30207        c = cos(eps0);
30208        vec[0] = p;
30209        vec[1] = - q*c - w*s;
30210        vec[2] = - q*s + w*c;
30211 
30212        return vec;
30213 
30214     }
30215 
30216     /**
30217     *
30218     *  Long-term precession of the equator.
30219     *
30220     * <p>This function is derived from the International Astronomical Union's
30221     *  SOFA (Standards of Fundamental Astronomy) software collection.
30222     *
30223     *  <p>Status:  support function.
30224     *
30225     *  <!-- Given: -->
30226     *     @param epj     double         Julian epoch (TT)
30227     *
30228     * <!-- Returned: -->
30229     *     @return     double[3]      equator pole unit vector
30230     *
30231     *  <p>Notes: <ol>
30232     *
30233     *  <li> The returned vector is with respect to the J2000.0 mean equator
30234     *     and equinox.
30235     *
30236     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30237     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30238     *     100 microarcseconds during the 20th and 21st centuries.  It is
30239     *     accurate to a few arcseconds throughout the historical period,
30240     *     worsening to a few tenths of a degree at the end of the
30241     *     +/- 200,000 year time span.
30242     *</ol>
30243     *  References:
30244     *
30245     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30246     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30247     *    A22
30248     *
30249     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30250     *    expressions, valid for long time intervals (Corrigendum),
30251     *    Astron.Astrophys. 541, C1
30252     *
30253     *   @version  2016 February 9
30254     *
30255     *  @since JSOFA release 20160503
30256     *
30257     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30258     */
30259     public static double[] jauLtpequ(double epj)
30260     {
30261         double veq[] = new double[3];
30262     /* Polynomial coefficients */
30263        final int NPOL = 4;
30264        final double xypol[][] = {
30265           {  5453.282155,
30266                 0.4252841,
30267                -0.00037173,
30268                -0.000000152},
30269           {-73750.930350,
30270                -0.7675452,
30271                -0.00018725,
30272                 0.000000231}
30273        };
30274 
30275     /* Periodic coefficients */
30276         final double xyper[][] = {
30277           { 256.75, -819.940624,75004.344875,81491.287984, 1558.515853},
30278           { 708.15,-8444.676815,  624.033993,  787.163481, 7774.939698},
30279           { 274.20, 2600.009459, 1251.136893, 1251.296102,-2219.534038},
30280           { 241.45, 2755.175630,-1102.212834,-1257.950837,-2523.969396},
30281           {2309.00, -167.659835,-2660.664980,-2966.799730,  247.850422},
30282           { 492.20,  871.855056,  699.291817,  639.744522, -846.485643},
30283           { 396.10,   44.769698,  153.167220,  131.600209,-1393.124055},
30284           { 288.90, -512.313065, -950.865637, -445.040117,  368.526116},
30285           { 231.10, -819.415595,  499.754645,  584.522874,  749.045012},
30286           {1610.00, -538.071099, -145.188210,  -89.756563,  444.704518},
30287           { 620.00, -189.793622,  558.116553,  524.429630,  235.934465},
30288           { 157.87, -402.922932,  -23.923029,  -13.549067,  374.049623},
30289           { 220.30,  179.516345, -165.405086, -210.157124, -171.330180},
30290           {1200.00,   -9.814756,    9.344131,  -44.919798,  -22.899655}
30291        };
30292        final int NPER = xyper.length;
30293 
30294     /* Miscellaneous */
30295        int i;
30296        double t, x, y, w, a, s, c;
30297 
30298 
30299     /* Centuries since J2000. */
30300        t  = ( epj - 2000.0 ) / 100.0;
30301 
30302     /* Initialize X and Y accumulators. */
30303        x = 0.0;
30304        y = 0.0;
30305 
30306     /* Periodic terms. */
30307        w = D2PI * t;
30308        for ( i = 0; i < NPER; i++ ) {
30309           a = w / xyper[i][0];
30310           s = sin(a);
30311           c = cos(a);
30312           x += c*xyper[i][1] + s*xyper[i][3];
30313           y += c*xyper[i][2] + s*xyper[i][4];
30314        }
30315 
30316     /* Polynomial terms. */
30317        w = 1.0;
30318        for ( i = 0; i < NPOL; i++ ) {
30319           x += xypol[0][i]*w;
30320           y += xypol[1][i]*w;
30321           w *= t;
30322        }
30323 
30324     /* X and Y (direction cosines). */
30325        x *= DAS2R;
30326        y *= DAS2R;
30327 
30328     /* Form the equator pole vector. */
30329        veq[0] = x;
30330        veq[1] = y;
30331        w = 1.0 - x*x - y*y;
30332        veq[2] = w < 0.0 ? 0.0 : sqrt(w);
30333 
30334        
30335        return veq;
30336 
30337     }
30338    
30339 }
30340 
30341 /*
30342  * Copyright © 2016 Paul Harrison, University of Manchester.
30343  * 
30344  * This JSOFA software is derived from the official C release of the "Standards Of Fundamental Astronomy" (SOFA) library 
30345  * of the International Astronomical Union. The intention is to reproduce the functionality and algorithms of 
30346  * the official SOFA library in a pure Java form.
30347  * 
30348  * The responsibility for the maintenance and supply of the JSOFA library lies with the author (not the IAU SOFA Board), 
30349  * However, The JSOFA software is provided "as is" and the author makes no warranty as to its use or performance. 
30350  * The author does not and cannot warrant the performance or results which the user may obtain by using the JSOFA software. 
30351  * The author makes no warranties, express or implied, as to non-infringement of third party rights, merchantability,
30352  * or fitness for any particular purpose. In no event will the author be liable to the user for any consequential, 
30353  * incidental, or special damages, including any lost profits or lost savings, even if the author has been advised
30354  * of such damages, or for any claim by any third party.
30355  * 
30356  * Other conditions of the original license (reproduced below) are carried over as applicable.
30357  */
30358 
30359 /*----------------------------------------------------------------------
30360 **
30361 **  Copyright (C) 2016
30362 **  Standards Of Fundamental Astronomy Board
30363 **  of the International Astronomical Union.
30364 **
30365 **  =====================
30366 **  SOFA Software License
30367 **  =====================
30368 **
30369 **  NOTICE TO USER:
30370 **
30371 **  BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
30372 **  CONDITIONS WHICH APPLY TO ITS USE.
30373 **
30374 **  1. The Software is owned by the IAU SOFA Board ("SOFA").
30375 **
30376 **  2. Permission is granted to anyone to use the SOFA software for any
30377 **     purpose, including commercial applications, free of charge and
30378 **     without payment of royalties, subject to the conditions and
30379 **     restrictions listed below.
30380 **
30381 **  3. You (the user) may copy and distribute SOFA source code to others,
30382 **     and use and adapt its code and algorithms in your own software,
30383 **     on a world-wide, royalty-free basis.  That portion of your
30384 **     distribution that does not consist of intact and unchanged copies
30385 **     of SOFA source code files is a "derived work" that must comply
30386 **     with the following requirements:
30387 **
30388 **     a) Your work shall be marked or carry a statement that it
30389 **        (i) uses routines and computations derived by you from
30390 **        software provided by SOFA under license to you; and
30391 **        (ii) does not itself constitute software provided by and/or
30392 **        endorsed by SOFA.
30393 **
30394 **     b) The source code of your derived work must contain descriptions
30395 **        of how the derived work is based upon, contains and/or differs
30396 **        from the original SOFA software.
30397 **
30398 **     c) The names of all routines in your derived work shall not
30399 **        include the prefix "iau" or "sofa" or trivial modifications
30400 **        thereof such as changes of case.
30401 **
30402 **     d) The origin of the SOFA components of your derived work must
30403 **        not be misrepresented;  you must not claim that you wrote the
30404 **        original software, nor file a patent application for SOFA
30405 **        software or algorithms embedded in the SOFA software.
30406 **
30407 **     e) These requirements must be reproduced intact in any source
30408 **        distribution and shall apply to anyone to whom you have
30409 **        granted a further right to modify the source code of your
30410 **        derived work.
30411 **
30412 **     Note that, as originally distributed, the SOFA software is
30413 **     intended to be a definitive implementation of the IAU standards,
30414 **     and consequently third-party modifications are discouraged.  All
30415 **     variations, no matter how minor, must be explicitly marked as
30416 **     such, as explained above.
30417 **
30418 **  4. You shall not cause the SOFA software to be brought into
30419 **     disrepute, either by misuse, or use for inappropriate tasks, or
30420 **     by inappropriate modification.
30421 **
30422 **  5. The SOFA software is provided "as is" and SOFA makes no warranty
30423 **     as to its use or performance.   SOFA does not and cannot warrant
30424 **     the performance or results which the user may obtain by using the
30425 **     SOFA software.  SOFA makes no warranties, express or implied, as
30426 **     to non-infringement of third party rights, merchantability, or
30427 **     fitness for any particular purpose.  In no event will SOFA be
30428 **     liable to the user for any consequential, incidental, or special
30429 **     damages, including any lost profits or lost savings, even if a
30430 **     SOFA representative has been advised of such damages, or for any
30431 **     claim by any third party.
30432 **
30433 **  6. The provision of any version of the SOFA software under the terms
30434 **     and conditions specified herein does not imply that future
30435 **     versions will also be made available under the same terms and
30436 **     conditions.
30437 *
30438 **  In any published work or commercial product which uses the SOFA
30439 **  software directly, acknowledgement (see www.iausofa.org) is
30440 **  appreciated.
30441 **
30442 **  Correspondence concerning SOFA software should be addressed as
30443 **  follows:
30444 **
30445 **      By email:  sofa@ukho.gov.uk
30446 **      By post:   IAU SOFA Center
30447 **                 HM Nautical Almanac Office
30448 **                 UK Hydrographic Office
30449 **                 Admiralty Way, Taunton
30450 **                 Somerset, TA1 2DN
30451 **                 United Kingdom
30452 **
30453 **--------------------------------------------------------------------*/
30454 
30455 
30456 /*
30457  * $Log$
30458  */